What is the Primary SMTP email address

Testing a software recently, however still can’t get it up and running properly.  I have been dealing with the support guys but not having much luck, and they keeps on complaining about our Exchange.  He wants me to generate a list of the primary smtp email address for each mailbox user, so I find this post from on Google – http://unlockpowershell.wordpress.com/2010/01/27/powershell-get-mailbox-display-smtp-addresses/.

Thanks Xaegr and Karl’s scriptblock!!  This is only applicable to Exchange 2007 and 2010 powershell.

Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}} | Export-Csv <csv file> –NoTypeInformation

With the above powershell script, you will be able to extract all Mailbox name, primary server, primary smtp and if any secondary smtp addresses.  Especially with the “Export” at the end to output it into a CSV file, I can read properly with Excel, but don’t forget to change the file name and path before running this script.

Cheers.