Exchange 2013 DAG – Install cumulative update (unattended)

Please ensure you have a backup of your Exchange server before doing this
Download and extract the cumulative update
Open CMD prompt (make sure you run as administrator) and run these commands from the extracted directory
Setup.exe /prepareSchema /IAcceptExchangeServerLicenseTerms Setup.exe /prepareAD /IAcceptExchangeServerLicenseTerms Setup.exe /prepareDomain /IAcceptExchangeServerLicenseTerms
Put 1st DAG server into maintenance mode (use exchange powershell)
$server = $ENV:ComputerName Set-ServerComponentState $server -Component HubTransport -State Draining -Requester Maintenance Redirect-Message -Server $server -Target nameof2ndserver Suspend-ClusterNode $server Set-MailboxServer $server -DatabaseCopyActivationDisabledAndMoveNow $True Set-MailboxServer $server -DatabaseCopyAutoActivationPolicy Blocked Set-ServerComponentState $server -Component ServerWideOffline -State Inactive -Requester Maintenance
Close exchange powershell and open CMD prompt (as administrator user)
Setup.exe /mode:upgrade /IAcceptExchangeServerLicenseTerms
When finished, open exchange powershell and take server out of maintenance mode
$server = $ENV:ComputerName Set-ServerComponentState $server -Component ServerWideOffline -State Active -Requester Maintenance Resume-ClusterNode $server Set-MailboxServer $server -DatabaseCopyActivationDisabledAndMoveNow $False Set-MailboxServer $server -DatabaseCopyAutoActivationPolicy Unrestricted Set-ServerComponentState $server -Component HubTransport -State Active -Requester Maintenance Restart-Service MSExchangeTransport Restart-Service MSExchangeFrontEndTransport
Then run the same process on the other Exchange DAG server