Export all Email addresses to CSV file – Exchange 2010
Useful script to export all the Primary email addresses and aliases to a simple CSV file which can be read easily.
This outputs the file to c:\emails.csv for example but can be changed.
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}} | Export-CSV c:\emails.csv -NoTypeInformation
Hope this helps
Leave a Reply