Exchange Powershell, get email addresses KB1039846


This command is useful for getting email addresses and the associated user accounts.

Example the users name is Ken and his email is and the domain name is Business. You look at his user account but his account doesn’t have this email address

Open Exchange Powershell and paste this command in it but you must change the file path
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}} > “C:New folderemails.txt

Leave a Reply