Skype Exchange 4U

Microsoft Skype Exchange Server Blog

how to check primary smtp address of multiple users on Exchange .

You can use of the below script to check the primary smtp address of multiple users.Copy the below script.ps1 format. SAM account which you want to check in text file on Exchange server.C:\ check_user_primary.txt

$a = Get-Content .\check_user_primary.txt

$result = @()

 foreach($i in $a)


  $b = Get-ADUser $i -Properties mail | select SamAccountName,mail

  $mbxdetail = New-Object PSObject

  $mbxdetail | Add-Member -MemberType NoteProperty -Name "SamaccountName" -Value $b.SamAccountName

  $mbxdetail | Add-Member -MemberType NoteProperty -Name "mail" -Value $b.mail

  $result += $mbxdetail


$result | Export-Csv .\check.csv -NoTypeInformation