Script: Fix-ProxyAddress.ps1

I recently blogged about the "MigrationPermanentException: The target mailbox doesn't have an SMTP proxy matching ''." error message that occurs when attempting to perform a remote mailbox move for a user that doesn’t have the correct SMTP proxy address. I put together a script to help simplify the process of adding the relevant SMTP proxy address to effected users.

Once launched, the script will prompt for your tenant routing domain in the format '' and will search for all mailboxes in the organization that do not have an email address policy applied. A new SMTP proxy address will be added to all mailboxes without an email address policy. The proxy address will be based on the alias of the primary SMTP address and the routing domain entered, e.g if the primary SMTP address is and the routing domain entered is the resulting proxy address will be

Requirements: This script has been tested and is known to work with Exchange 2010 and Exchange 2013.

Usage: There are no parameters or switches, simply execute the script:


Execution Policy: The script has been digitally signed and will run just fine under a "RemoteSigned" execution policy.





Download: I have published it to the TechNet Gallery, it can be downloaded by clicking here...