Powershell Office 365 Exchange list primary smtp addresses
Office 365 Exchange list primary smtp addresses
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,alias,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}}