In part 2 of this series, we will:
- Update schema, AD, and domain via command prompt on a domain controller
- Put Exchange host in maintenance mode via Exchange Management Shell
Before proceeding, be sure the account used is a member of Enterprise Admins and Schema Admins groups in Active Directory.
In part 1, we copied the CU installer to the domain controller. We will now proceed running three commands below.
- Launch a command prompt as administrator
- Navigate to where the CU installer is saved
- Run setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms
- Run setup.exe /PrepareAD /IAcceptExchangeServerLicenseTerms
- Run setup.exe /PrepareDomain /IAcceptExchangeServerLicenseTerms
I encountered the error below when executing the first command. I then double checked to confirm the account’s membership and restarted the domain controller as well before running the command again.
- The logged-on user is not a member of the Schema Admins group
- The computer needs to be restarted before Setup can continue
We will now put the Exchange host in maintenance mode prior to installing the CU.
First, launch Exchange Management Shell as administrator before running the commands below. Otherwise, it will fail.
Assuming you have multiple Exchange servers in a DAG, failover any active database to another server (Move-ActiveMailboxDatabase Database -ActivateOnServer Server_Name).
The rest of the commands are:
- Set-ServerComponentState hostname1 –Component HubTransport –State Draining –Requester Maintenance
- Restart-Service MSExchangeTransport
- Restart-Service MSExchangeFrontEndTransport
- Redirect-Message -Server hostname1 –Target hostname2.domain.com
- Suspend-ClusterNode –Name hostname1
- Set-MailboxServer hostname1 -DatabaseCopyActivationDisabledAndMoveNow $True
- Set-MailboxServer hostname1 –DatabaseCopyAutoActivationPolicy Blocked
- Set-ServerComponentState hostname1 -Component ServerWideOffline -State Inactive -Requester Maintenance
Confirm server is in maintenance mode by running:
- Get-ServerComponentState <ServerName> | ft Component,State –Autosize
All components should show Inactive except for Monitoring and RecoveryActionsEnabled
One last recommendation is to give this Exchange server a quick reboot to ensure absolutely no connection from any client (Outlook, OWA, ActiveSync) before we begin the installation in part 3 of this series.