Export all SMTP address into a CSV from Exchange 2007 and 2010 (PowerShell)

In the Exchange Power Shell :

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

The file smtp.csv will be located in c:

You might want to change the path.

 

Leave a Reply

Your email address will not be published. Required fields are marked *