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 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 -EmailAddresses @{add= "" }

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

in my example I'm adding an address for the 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: