Exchange Online mailbox move – Unable to connect to Remote MRS proxy server

Recently in an Exchange Hybrid environment with Exchange Server 2016 on-premise and Exchange Online in Office 365 I encountered the following error message when trying to move a mailbox from on-premise to Exchange Online using New Migration Batch on Remote MRS proxy server:

”The connection to the server ’’ could not be completed”

On the on-premise Exchange Server I ran the Test-MigrationServerAvailability command with the following parameters to verify the availability with migrating cross-forest:

The result returned with Failed and looking at the error message, we can see the following:

The call to ’’ failed”.

Trying manually to go to the URL, it returned with an error code of: ”Server Error in ’/EWS’ Application.”
Normally it would have returned ”The webpage cannot be found” with an 404 error code.

Going to the on-premise Exchange Admin Center, Servers > Virtual Directories > EWS (Default Web Site) I wanted to verify that MRS is enabled for that server – but as the picture shown below, it wasn’t.

I enabled the MRS Proxy Endpoint for the server by selecting the checkbox and press Save:

Restarting the WebAppPool MSExchangeServersAppPool on the specific server using the following command to make sure everything applied and any cache are cleared:

Going again to the URL I now received the correct ”error code” of ”The webpage cannot be found” and 404.

Rerunning the Test-MigrationServerAvailability command, I now received a Success as the result:

Going back to the new migration batch, I could now proceed with the move of the mailbox to Exchange Online.

Disclaimer: All information on this blog is offered "as is" with no warranty. It is strongly recommended that you verify all information and validate all scripts in isolated test environments before using them in production environments.