When you run the Office 365 Hybrid Configuration wizard (https://aka.ms/taphcw), you receive the following error message when the wizard tries to connect to your on-premises Exchange environment:
Additionally, you experience the following symptoms:
When you run the Get-ExchangeServer * | FL command, the output returns an Exchange server that you don't expect to see. This server has either been decommissioned or is no longer available, and you don't intend to bring the server back online.
When you view the Hybrid Configuration wizard log file at %appdata%\Microsoft\Exchange Hybrid Configuration, you see the following:
An entry that resembles the following for the Exchange server that's no longer available. This entry confirms that the server doesn't return a domain name.
Warning These steps require Active Directory Service Interfaces Editor (ADSI Edit). Using ADSI Edit incorrectly can cause serious problems that may require you to reinstall your operating system. We can't guarantee that problems that result from the incorrect use of ADSI Edit can be resolved. Use ADSI Edit at your own risk.
Use ADSI Edit to remove the Exchange server from the domain configuration:
Open ADSI Edit, and then connect to the Configuration container.
Locate the following:
CN=Servers, CN=Exchange Administrative Group (FYDIBOHF23SPDLT), CN=Administrative Groups, CN=Contoso,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=Contoso,DC=com
In the Servers container, remove the CN=<ServerName> object of the Exchange server that's no longer available in your environment.
Confirm that the Exchange server is removed from the domain configuration. To do this, open the Exchange Management Shell, and then run the following PowerShell command:
Get-ExchangeServer * | FL
Make sure that the server is no longer listed in the output. You may have to wait for Active Directory replication to complete.