Upgrade to Exchange Server 2013 RTM CU2

Now that Microsoft has released Exchange Server 2013 RTM CU2 it’s time to have a closer look at installing this Cumulative Update.

In contrast with the previous Update Rollups as we’ve seen in Exchange 2007 and Exchange 2010, which were only a set of hotfixes bundled together, a Cumulative Update is a full version of the product. So, it is now possible to install an Exchange 2013 server from scratch using the CU2 download.

Another advantage of a CU is that Microsoft can bundle new functionality into the product, even Schema changes are possible (as a matter of fact CU2 does include a number of Schema changes) but also the Configuration container in Active Directory can be changed.

The downside is that installing a CU is basically a full upgrade, just like a Service Pack in Exchange Server 2010. When you have made customizations these will be lost. OWA customizations is an example of this, but also changes in config files for example will be overwritten.

Note. If you have the Unified Messaging configured for use with different (i.e. non-US) language packs the upgrade will fail. The additional language packs need to be uninstalled first using the setup.exe /RemoveUMLanguagePack: <UmLanguagePackName> first.

Installing CU2 is pretty simple. Download the CU2 bits from the Microsoft download site and extract CU2 to an installation directory or share. Navigate to the install share and start the setup application and follow the wizard.

The problem is however that there’s no way back. When the setup crashes and the server ends-up in an unknown (and unmovable) state you’re in deep trouble and you need to start a disaster recovery process. If you’re running a DAG and a DAG member fails than it’s not a big deal since your data is safe on another DAG member. But if you have a single Exchange 2013 server it most likely will be a long night L

Also bear in mind that there’s no way back. Once installed and you’re not happy with CU2 you CANNOT uninstall it.

image

Figure 1 – During the upgrade to CU2 all old Exchange binaries will be removed!

Exchange Server 2013 RTM CU2 does include some schema changes. Exchange Server 2013 RTM CU1 has the following schema version (retrieved from the ms-Exch-Schema-Version-Pt object in the Schema): 15524.

You can use the following Powershell commands to retrieve this:

$root = [ADSI]LDAP://RootDSE
$m = [ADSI](“LDAP://” + “CN=ms-Exch-Schema-Version-Pt,” + $root.schemaNamingContext)
$m.rangeUpper

image

It is possible to run the CU2 setup application in unattended mode and separate the Active Directory changes from the regular CU2 installation.

To upgrade the Schema to the new version you can use the following unattended commands:

setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms

This will raise the Schema version to 15281.

The Active Directory Configuration partition can be upgraded with the following command:

setup.exe /PrepareAD /IAcceptExchangeServerLicenseTerms

The last step is upgrading the Active Directory domain:

setup.exe /PrepareDomain /IAcceptExchangeServerLicenseTerms

Installing CU2 in an unattended mode is easy, just use the following command:

setup.exe /mode:upgrade /IAcceptExchangeServerLicenseTerms

Upgrading DAG members

If you have multiple Exchange 2013 servers you have to put the DAG member that will be upgraded in maintenance mode. In maintenance mode all active copies of the Mailbox databases will be moved off of the server and the possibility of moving back will be blocked. Also the Primary Active Manager (PAM) is running on this server will be moved to another DAG member.

The process is as follows:

  • Put a DAG member in maintenance mode.
  • Install the Cumulative Update.
  • Take the DAG member out of maintenance mode.
  • Redistribute the active Mailbox databases across the DAG.

Note. If you’re running a DAG most likely you will have multiple Exchange Server 2013 Client Access servers as well, or maybe you have both roles on the same server. Either way, the Client Access server needs to be disabled in the load balancers as well of course.

To put a DAG member in Maintenance Mode open the Exchange Management Shell, navigate to the $Exscripts directory and enter the StartDAGServerMaintenance.ps1 -Server <<servername>> command:

image

Don’t let the following ‘warning’ scare you 😉

The following objects are hosted by ‘AMS-EXCH02′, before attempting to move them off: `n(Primary Active Manager=AMS-EXCH02) (Database=’DB02′, Reason=’Copy is active’) (Database=’DB02′, Reason=’Copy is critical for redundancy according to Red Alert script’) (Database=’DB01′, Reason=’Copy is critical for redundancy according to Red Alert script’))

If you run a Get-MailboxDatabase | Get-MailboxDatabaseCopyStatus command you’ll see the active mailbox databases are now running on another server.

Now install the CU2 binaries as explained before. It is my personal best practice to reboot the server after the installation has finished, although the setup application does not request to reboot the server.

Once installed the DAG member can be taken out of Maintenance Mode. Open the Exchange Management Shell and enter the StopDAGServerMaintenance.ps1 -Server <<servername>> command from the $Exscripts directory.

Note. I’ve heard a couple of instances where the front-end transport service (FETS) did not run when the server was taken out of maintenance mode. Rebooting the server did fix this ‘issue’, but Microsoft is investigating what’s actually going on.

The last step is to redistribute the Mailbox database across the DAG. You can use the RedistributeActiveDatabases.ps1 script in the $Exscripts directory to do this:

RedistributeActiveDatabases.ps1 -DagName <<name>> -BalanceDbsByActivationPreference -Confirm:$False

image

Use the Get-MailboxDatabase | Get-MailboxDatabaseCopyStatus command to check the status of the Mailbox database replication.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s