Deployment of Exchange Server 2013 Cumulative Update

Introduction

Unlike previous versions of Exchange Server 2013 the deployment of Cumulative Updates corresponds to a full Exchange Server Setup. Therefore, it is not possible to perform a Cumulative Update uninstall.
  
The required time for the Installation of a Cumulative Update should not be underestimated when scheduling a maintenance period.
 
Note
Changes made to local configuration files, e.g. web.config or other Exchange.config files, will not be preserved by the setup process. Those files will be overwritten by the Cumulative Update setup.
 

Preparation

Prior activating Exchange Server maintenance it is necessary to make some preparations to avoid unnecessary failure situations of the Exchange CU Setup. The Exchange Server 2013 CU Setup needs to be executed in a PowerShell console with administrative permission and not in an Exchange Management Console (EMC).
 

Disk Space

The Exchange Server 2013 disk drive requires at least 10 GB free disk space. If the disk space is less, ensure the required disk space by freeing up the disk drive.

PowerShell Execution Policy

If PowerShell Execution Policy is set by Group Policy (GPO) the Exchange Server 2013 prerequisites check will fail.
 
Check the current configuration by using Get-ExecutionPolicy -List.
 
If the MachinePolicy is configured, use the following cmdlet to set the Execution Policy to undefined (administrative permission might be required).
Get-ExecutionPolicy -List
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell -Name ExecutionPolicy -Value ""

DNS Server

The Exchange Server prerequisites check will fail, one of the NIC configured DNS Servers cannot be contacted on port 53. This might be the case, if a dedicated management network is in use. Remove the DNS Server configuration from management network setup. Do not remove the DNS server configuration of the primary NIC.

Activate Maintenance

Run an administrative Exchange Management Shell ( EMS) und check the current status of all server components first.
At this point all components are required to be active. stehen. As next Action set components  Hub Transport and UM Call Router to Draining. These Settings must be executed as administrator, because the upcoming scripts StartDAGMaintenance and StopDAGMaintenance perform cluster actions as well.
 
Get-ServerComponentState [SERVERNAME] 
Set-ServerComponentState [SERVERNAME] –Component HubTransport –State Draining –Requester Maintenance 
Set-ServerComponentState [SERVERNAME] –Component UMCallRouter –State Draining –Requester Maintenance
Move messages currently managed by the local Trans Service to another Transport Server.
Redirect-Message –Server [SOURCESERVER FQDN] –Target [TARGETSERVER FQDN]
As a next step set the Exchange Server in DAG Maintenance Mode. If your DAG contains two database copies only, add the Switch Parameter -overrideMinimumTwoCopies to the StartDAGServerMaintenance.ps1 call.
cd $ExScripts 
.\StartDAGServerMaintenance.ps1 [SERVERNAME] 
Get-MailboxDatabaseCopyStatus -Server [SERVERNAME]
Set the server to server wide maintenance.
Set-ServerComponentState [SERVERNAME] –Component ServerWideOffline –State Inactive –Requester Maintenance

Installation

When all server components are set to maintenance, the new Exchange Server 2013 Cumulative Update can be installed. Close the Exchange Management Shell (EMS) and open a new administrative PowerShell session. Switch to the uncompressed Exchange 2013 CU package and start the setup.
 
.\setup.exe /Mode:Upgrade /IAcceptExchangeServerLicenseTerms
When the first part of the setup has finisched, a server reboot will be requested. After the sucessful restart of the server continue the Exchange Server CU Setup by opening a new administrative PowerShell session and running setup again.
.\setup.exe /Mode:Upgrade /IAcceptExchangeServerLicenseTerms
After sucessfully finishing the Exchange Server 2013 CU a reboot is not required. You can reboot the server, if you will.
Check the current Versions of the Exchange Servers in your environment.
Get-ExchangeServer | ft Name, Admin*

Deactivate Maintenance

After setup of Exchange Server 2013 CU the Exchange Server must be taken out of maintenance to accept connections again.
Set-ServerComponentState [SERVERNAME] -Component ServerWideOffline -State Active -Requester Maintenance 
Get-ServerComponentState [SERVERNAME]
If you have set the Hub Transport and UM Call Router compontents to Draining,  it is required to active these components seperately.
Set-ServerComponentState [SERVERNAME] -Component UMCallRouter -State Active -Requester Maintenance 
Set-ServerComponentState [SERVERNAME] -Component HuBTransport -State Active -Requester Maintenance 
Get-ServerComponentState [SERVERNAME]
Stop DAG maintenance.
cd $ExScripts 
.\StopDAGServerMaintenance.ps1 [SERVERNAME] 
Get-MailboxDatabaseCopyStatus -Server [SERVERNAME]
 

Active Database Distribution

After finishing maintenance the active mailbox database copies should be redistributed using the configured Activation Preference.
 
cd $ExScripts
.\RedistributeActiveDatabases.ps1 -DagName [DAGNAME] -BalanceDbsByActivationPreference -Confirm:$false
 
 

Read more about our Consulting Services: http://www.granikos.eu/en
 
Articles and Information provided in the Granikos Knowledge Base is posted as a service offering only and provided AS-IS. Granikos GmbH & Co. KG makes no warranty, implied or otherwise, regarding the performance or reliability of the information provided. The reader has to make a decision on how the information is being used.