Let’s say that we have an Exchange Server 2010 with hybrid setup with Exchange Online (Office 365). Now, it’s time to make the move and migrate to a newer Exchange Server, say 2016. The coexistence is supported and all is in line. Since we already have the hybrid configuration in place, we would like to keep the connection and set up the same environment as the predecessor.
Before installing a newer version of Exchange Server, we need to prepare the Active Directory schema to accept the changes in our infrastructure and prepare for the installation. For this, we need to use the executable and run it with the following parameters.
Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms
However, when we run this command, we get the below error:
A hybrid deployment with Microsoft 365 or Office 365 has been detected. Please ensure that you are running setup with the /TenantOrganizationConfig switch. To use the TenantOrganizationConfig switch you must first connect to your Exchange Online tenant via PowerShell and execute the following command: “Get-OrganizationConfig | Export-Clixml -Path MyTenantOrganizationConfig.XML”. Once the XML file has been generated, run setup with the TenantOrganizationConfig switch as follows “/TenantOrganizationConfig MyTenantOrganizationConfig.XML
If you continue to see this message then it indicates that either the XML file specified is corrupt, or you are attempting to upgrade your on-premises Exchange installation to a build that isn’t compatible with the Exchange version of your Microsoft 365 tenant. Your Microsoft 365 tenant must be upgraded to a compatible version of Exchange before upgrading your on-premises Exchange installation. For more information, see: http://go.microsoft.com/fwlink/?LinkId=262888
One would normally go for the link (see the above message) to see more information. But unfortunately, it will not be of much help as Exchange Server 2010 is out of support and has reached end of life. All the documentation online has been updated for Exchange Server 2016 onwards.
In the error message, it indicates to run the Get-OrganizationConfig command.
Get-OrganizationConfig | Export-Clixml -Path C:\Install\MyTenantOrganizationConfig.XML
This command will get the organization configuration from the Exchange Online and export it to an XML file. A typical XML file export would look like the given below.
Now, we need to re-run the setup. But if we use the /TenantOrgianizationConfig switch, it will not work with the /PrepareSchema switch as it will only work with the /PrepareAD switch. If we run the /PrepareSchema switch with the /TenantOrgianizationConfig switch, we will get the following error.
The parameter 'TenantOrganizationConfig' is not valid for current operation 'PrepareSchema'. Setup checks failed: Invalid command line arguments.
In order to make it work, we need to run the command as given below, specifying the location of the exported XML. This doesn’t mean that we need to re-run the setup with the /PrepareSchema switch afterwards, as the /PrepareAD switch will automatically trigger the /PrepareSchema switch.
Setup.exe /PrepareAD /TenantOrganizationConfig C:\Install\TenantOrganizationConfig.XML /IAcceptExchangeServerLicenseTerms
If all goes well, we can go ahead and run the setup with the /PrepareDomain switch. If successful, we can then install the additional Exchange Server 2016 Server in the existing Exchange Server 2010 hybrid environment.
What if the Issue Persists?
If the problem still persists, then we need to look deeper into our current Exchange Server. We must ensure that the installation has the latest Cumulative Update (CU) installed and the Exchange Server is running at its best. We need to also ensure that all the databases are mounted and there are no issues. A good place to start is to look at the Event Viewer to make sure that there are no Exchange Server issues or other underlying issues with the operating system.
During the execution of the setup of the new Exchange Server, we might encounter issues, such as:
"Failed [Rule:DidTenantSettingCreatedAnException] [Message:The OrganizationConfigHash property appears to be from a different Exchange Online tenant than the one you have a hybrid deployment with.]"
"[REQUIRED] The OrganizationConfigHash property appears to be from a different Exchange Online tenant than the one you have a hybrid deployment with."
When such things happen, it means there could be other issues with the Exchange Server or hybrid configuration which are impacting the migration.
When having such issues, the one solution that comes to mind is to fully uninstall Exchange Server 2010 and install a new Exchange Server 2016. That would resolve the issue. But what about the transfer of data? The Exchange Server databases are not easily portable.
In such a situation, you can use applications like Stellar Converter for EDB that can ease the transfer of data. This application can easily open multiple databases from any version of Exchange Server without having an Exchange Server installed. The application can be installed on a Windows client machine or Windows Server operating system. It allows to export mailboxes, archives, shared mailboxes, disabled mailboxes, and public folders directly to a live Exchange Server of any version. It can also be used as a migration tool to migrate to Microsoft 365 or Office 365.