UPDATED: 1/19/2023
Before you install a new version of Exchange, you will need to perform a number of tasks in Active Directory. This is true for both migrating an older version of Exchange, or, installing into a greenfield that has had no prior iteration of Exchange. This will involve the following tasks.
Setup will perform these steps during its main installation if it determines they have not been run. So, you may wonder why you would ever perform these steps manually.
One possibility is that a company operates in a split-permissions model. In large organizations, two separate teams may manage Active Directory and Exchange. If least privilege is in place, it is likely that the Exchange team cannot perform elevated Active Directory tasks such as schema extensions. Similarly, the Active Directory team may not have permission to manage Exchange. In this case, the Active Directory team will need to run the commands manually before the main setup.
Another possibility is that a company may have a large geographically dispersed network with multiple Active Directory sites. It could have its schema master in one site and its Exchange servers in a totally different site. The links between these sites could have any number of restrictions upon them, such as a long interval between replication cycles. In that case, the company will need to run the command manually in the site hosting the schema master and allow time for replication.
This article illustrates how to perform these tasks from a command line.
Tip: These same instructions work for Exchange 2010, 2013, 2016, and 2019 installations. In addition, these tasks often have to be repeated when performing cumulative updates. For more information on whether your cumulative update requires these commands, be sure to check official Microsoft documentation.
Extending the Schema
To do this, we must first open an elevated command prompt. We need to do this from a machine running a 64-bit version of Windows. The minimum version of Windows required is dictated by the Exchange Supportability Matrix. This machine must also be in the same site and domain as the schema master. The computer we execute this from does not have to be a domain controller. For smaller companies with a single-domain/single-site environment, we can simply run these commands from the intended Exchange server.
Tip: To perform this update, you must be a member of both the Enterprise and Schema admin groups.
Change to the directory containing your Exchange setup files and issue the following command. Be sure to include the license agreement switch.
Tip: Starting with Exchange 2016 CU22 and Exchange 2019 CU11, Microsoft replaced the /IAcceptExchangeServerLicenseTerms parameter with the option to send diagnostic data to Microsoft. To send the optional data, use the /IAcceptExchangeServerLicenseTerms_DiagnosticDataON parameter. If you do not wish to send any data, use /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF. Note that this can be changed post-installation using the Set-ExchangeServer cmdlet.
C:\Ex2016Setup> Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms_DiagnosticDataON
After several minutes the command will complete. You should see an output similar to the following.
[Read more…] about Extend, Prepare and Verify Active Directory for Exchange Server