Friday , January 19 2018

Dump All Proxy Address from Exchange Server

Dump All Proxy Address/Email Addresses from Exchange Server using PowerShell.

Mailboxes –

Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,Servername,EmailAddressPolicyEnabled,PrimarysmtpAddress, @{Name="EmailAddresses";Expression={$_.EmailAddresses | Where-object {$_.PrefixString -ceq "smtp"} |Foreach-object {$_.SmtpAddress}}} | Export-Csv EmailAddresses_MBX_Dump.csv

Distribution Groups –

Get-DistributionGroup -ResultSize Unlimited | Select-Object DisplayName,Servername,EmailAddressPolicyEnabled,PrimarysmtpAddress, @{Name="EmailAddresses";Expression={$_.EmailAddresses | Where-object {$_.PrefixString -ceq "smtp"} |Foreach-object {$_.SmtpAddress}}} | Export-Csv EmailAddresses_DG_Dump.csv

Mail Contacts –

Get-MailContact -ResultSize Unlimited | Select-Object DisplayName,Servername,EmailAddressPolicyEnabled,PrimarysmtpAddress, @{Name="EmailAddresses";Expression={$_.EmailAddresses | Where-object {$_.PrefixString -ceq "smtp"} |Foreach-object {$_.SmtpAddress}}} | Export-Csv EmailAddresses_Contact_Dump.csv

you can create a CSV as below,

image

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Exchange Server MVP , Publisher of CareExchange.in
Supporting/Deploying/Designing Microsoft Exchange for some years.
Extensive experience on Microsoft Technologies.

Check Also

Optimize Antispam Settings in Office 365

Lets see how to optimize anti spam settings in office 365. Anti spam settings can ...

One comment

  1. You can try also:

    Get-Recipient -ResultSize Unlimited | Select-Object RecipientType, DisplayName,Servername,EmailAddressPolicyEnabled,PrimarysmtpAddress,EmailAddresses | Export-CliXml RecipientsDump.xml

    does almost the same. Import-CliXml allows to work “offline” with this dump then.

Leave a Reply

Your email address will not be published.