Office 365 - EOL Migration - Add SMTP Routing/Proxy Address

Before migrating a mailbox to office 365, each account will need an SMTP routing address applied. This is normally completed as part of the hybrid configuration wizard, as it assigns a tenant.mail.onmicrosoft.com address to the Default Email address policy, but there are always those accounts that have the "Automatically update e-mail addresses based on e-mail address policy." un-ticked.

You can find these accounts by running the following

Get-Mailbox -ResultSize Unlimited | Where {$_.EmailAddressPolicyEnabled -eq $FALSE

or export them to CSV if you so wish (for backup)

Get-Mailbox -ResultSize Unlimited | Where {$_.EmailAddressPolicyEnabled -eq $FALSE} | Select * | Export-CSV emailaddresspolicy.csv

Before you try and migrate the mailbox you need to add the addresses to these accounts. You can do this manually via the ECP which could take a life time. Run a PowerShell command to add the SMTP address to the account, for example 

Set-Mailbox Test.MBX10@devpetersenit.ltd -EmailAddresses @{add= "Test.MBX10@dotpix.mail.onmicrosoft.com" }

Or just use this script created by Ilan Lanz (Ilantz) on the TechNet gallery to do the job for you:

https://gallery.technet.microsoft.com/Office-365-Add-Exchange-14c7f0c3

in my example I'm adding an address for the dotpix.mail.onmicrosoft.com domain. the command I'm using is:

.\Add-OnMicrosoftSMTP.ps1 -Tenant:dotpix





You can then proceed wit the mailbox migration. The full script is below:




Comments