If you would like to export all SMTP proxy addresses into CSV file to be used for your discovery or preparation for office 365 migration , here is simple PS script to complete the task.
Here is an example of user with three SMTP proxy address, we will capture all SMTP addresses for all users and provide output to CSV file.
|Get-Recipient -Identity Aki.Armstrong | Select Name -ExpandProperty EmailAddresses|
Now we want to capture all the SMTP proxy Addresses
Get-Recipient -Identity Aki.Armstrong | Select Name -ExpandProperty EmailAddresses | select Name,SmtpAddress
Now we need to add ( make sure you have the Temp directory under C drive or change the output as you wish to make it fit into your particular scenario.
Last thing is to make sure we add -ResultSize Unlimited ( this will be required if the query runs against more than 1000K recipients)
|Get-Recipient -ResultSize Unlimited -Identity Aki.Armstrong | Select Name -ExpandProperty EmailAddresses | select Name,SmtpAddress | export-csvC:\temp\All_SMTP_Proxy_Addresses_List.csv|
the CSV file will look similar to this one
If you like to collect more data, you can also use Get-member to see all available properties and adjust your output per your needs from available property list
|Get-Recipient -Identity Aki.Armstrong | Select-Object Name,EmailAddresses,ServerName|