Skype Exchange 4U

Microsoft Skype Exchange Server Blog

Microsoft Exchange 2013 Server Upgrade/Patching:

Solutions :Microsoft Exchange 2013 Server Upgrade/Patching:

1 Download the latest version of Exchange 2013 update.

Updates for Exchange 2013

2 Log on to the computer on which you want to install Exchange 2013.

3 Enable Maintenance Mode on the server Exchange server name. Before you can disable the Transport service, all active queues need to be drained first

Set-ServerComponentState "Exchange Server Name" -Component HubTransport -State Draining -Requester Maintenance

4 To check if the queues are empty we can use the get-queue cmdlet:

Get-Queue –server "Exchange Server Name"

5 You can speed up the process by moving the messages to a transport component hosted on another server. To do this you will need to use the move-messages cmdlet.

Ex:- Redirect-Messages -server ex02 –targetserver "Exchange Server Name"

6 Switchover any active databases currently mounted on the server and prevent those copies from being activated.

Once the cluster node has been stopped you will need to prevent the databases from being moved on the member
And as final step we want to set the auto activation policy temporarily to blocked:
Set-MailboxServer "Exchange Server Name" -DatabaseCopyActivationDisabledAndMoveNow $True
Set-MailboxServer "Exchange Server Name" -DatabaseCopyAutoActivationPolicy Blocked
Suspend-ClusterNode "Exchange Server Name"

7 If all queues are clean we can continue with disabling all the other components which are active on the server:

Set-ServerComponentState –identity "Exchange Server Name" –component serverwideoffline –state inactive –requestor maintenance

8 To verify if all components are set to the status “inactive” we could run the Get-ServerComponentState cmdlet

Get-ServerComponentState

9 We will use the cmdline to update our Exchange 2013 server. To update the server start the setup using the following parameters:

Setup.exe /m:upgrade /IacceptExchangeServerLicensing

10 Once the setup has finished, reboot the server. Once the server is back online it is time to restore the services.

11 To restore the services we will need to perform the steps mentioned earlier only then in reverse order.

First we will make the DAG member and active of part of the cluster again:

Resume-ClusterNode

12 Once this has been done we need to remove the limits for database failovers which we configured earlier:

Set-MailboxServer -Identity "Exchange Server Name" -DatabaseCopyActivationDisabledAndMoveNow $false

Set-MailboxServer -DatabaseCopyAutoActivationPolicy Unrestricted

13 Now our DAG member is back online we need to change the component states to active:

Set-ServerComponentStatus –identity "Exchange Server Name" –component serverwideoffline –status active –requestor maintenance

14 Since the server is a Mailbox Server, the transport queues need to be resumed as well:

Set-ServerComponentState –Identity $Server -Component HubTransport -State Active -Requester Maintenance

15 Confirm the status of the transport component.

Get-ServerComponentStatus

16 Never upgrade and reboot more than 1 server per DAG. When you run this cmdlet you can see the DAG member server names.

"Get-DatabaseAvailabilityGroup DAG0x (1-5) | FL Servers",

17 You may patch and reboot up to 5 servers at the same time, as you can select 1 from each separate DAG.

18 Make sure you run the following cmdlet to move all active copies of that server which is going to be upgraded/patched before rebooting it.

Get-MailboxServer "CurrentServerBeingPatched" | Move-MailboxDatabaseCopy -confirm:$false

19 Once you have patched all servers inside one DAG, run this cmdlet,

(This is to make sure after patching all Mailbox databases become active on preferred server)

D:\Exchange\Scripts\RedistributeActiveDatabases.ps1 -DagName DAG0x -BalanceDBsByActivationPreference -Confirm:$false

Thanks