Knowledge BasePowerShell Get-Mailbox display SMTP addresses
W P Staff asked 7 years ago

How do i export a list of email addresses from Exchange 2007 or Exchange 2010

1 Answers
W P Staff answered 7 years ago

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