Exchange Server: Use PowerShell to list all SMTP email addresses
Powershell commands
All Email Addresses Exchange Server
- get-recipient
- get-recipient | where {$_.emailaddresses -match “yshvili.local”} | fl name,emailaddresses >>recipient.txt
You need just the email addresses assigned to mailboxes can use simpler cmdlet
All Email Addresses Exchange Server
- get-mailbox
- get-mailbox | fl name, emailaddresses >> c:\mailbox.txt
get just the addresses used by mail-enabled public folders use the Get-MailPublicFolder cmdlet
- Get-MailPublicFolder
- Get-MailPublicFolder | fl Name,EmailAddresses >> pf-MailPublicFolder.txt
Cmdlets will output the addresses to a text file in the current directory
How to list all SMTP email addresses in Exchange
- Get-Recipient | GM
- Get-Recipient | Select Name -ExpandProperty EmailAddresses
- Get-Recipient | Select Name -ExpandProperty EmailAddresses | Select Name, SmtpAddress
- Get-Recipient | Select Name -ExpandProperty EmailAddresses | Select Name, SmtpAddress | Export-csv c:\yshvilimailAddress.csv