MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

How to perform patching for Exchange 2010 in DAG Environment

Let’s take a look at how to effectively patch Exchange 2010 DAG environment.

Windows and Exchange Application patching is an important regular requirement for the any Environment and this also requires a proper planning and regularity. If we don’t follow the process and don’t patch our servers then we leave our servers open for security risk and application bugs. Following the article will help in patching windows OS and Exchange application on an exchange server.

Permissions

The following permissions will be required.

  1. Windows Patching: Local Administrator
  2. Exchange Patching: The following group membership will be required:

Local Administrator;

Schema Admins;

Enterprise Admins;

Domain Admins;

Organization management.

Windows Patching Scope and execution cycle

  1. Cycle Time – Every Month
  2. Day – 2nd and 3rd Weekends
  3. Only one server at a time

Exchange Patching Scope and execution cycle

  1. Cycle Time – Every Quarter
  2. Day – 4th and Next Weekends
  3. Only one server at a time

Preparation

  1. Test the patches in the Lab
  2. Raise a change and wait for the approval. Also write tested in the lab.
  3. Once Change has been approved go ahead with further steps.
  4. Place servers in the maintenance mode Scom/Tivoli/other monitoring tool
  5. On Exchange Server Move PAM to other Exchange server
    1. Open Exchange management shell
    2. Run the following cmdlet

      cluster.exe “DagName” group “Cluster Group” /MoveTo:”destinationServer”

  6. Place servers in the DAG maintenance mode
    1. Open Exchange management shell
    2. Run the below cmdlet :

      Set-ExecutionPolicy Unrestricted

    3. Cd “Exchange ServerScripts”
    4. Run ‘maintenancewrapper’ script
    5. If you don’t find the script at the above location then download from the below link.

      http://blogs.technet.com/b/exchange/archive/2013/04/10/preserving-activation-blocks-after-performing-dag-member-maintenance.aspx

      .maintenanceWrapper.ps1 –server <SERVERNAME> –action START

    6. Verify the server is in maintenance mode and database has moved to the other server.

      To check maintenance mode run the below cmdlet:

      Get-DatabaseAvailabilityGroup -Status | fl Name,serversinmaintenance

To check the Database mounted on which server run the below cmdlet:

Get-MailboxDatabase | fl name,Server

If the above cmdlet cause any issue and server does not go in to the maintenance mode then follow this manual process to move database. On Exchange Server Move the Exchange Databases to other Exchange Servers

Open Exchange management shell and run the following cmdlet

Move-ActiveMailboxDatabase -Identity ‘DBNAme’ -ActivateOnServer ‘DestinationServer’ -MountDialOverride ‘None’

Patching Procedure

  1. Login to the server
  2. For Windows Patching
    1. Go to start à All Programs à Windows Update

             2. Click on the blue where it says numbers of updates are available.

             3. Ensure that there is no Exchange rollup/hotfix/ServicePack, if there is a rollup checked then UNCHECK the Exchange rollup/hotfix/ServicePack

             4. Then Click ok and then click on Install Updates

             5. Once completed click finished and restart the server.

 

    3. For Exchange Patching

  1. Download the patch or service pack from Microsoft link only.
  2. This “service pack/ roll up” will be preferred to download to one server and copied to all other server.
  3. Install the Exchange patch.
  4. Restart the server once Exchange patching has completed

 

Post Patching Activity

  1. Stop the maintenance mode
    1. Open Exchange management shell
    2. Run the below cmdlet :

       

      Set-ExecutionPolicy Unrestricted

       

    3. Cd “Exchange ServerScripts”
    4. Run ‘maintenancewrapper’ script
    5. If you don’t find the script at the above location then download from the below link.

      http://blogs.technet.com/b/exchange/archive/2013/04/10/preserving-activation-blocks-after-performing-dag-member-maintenance.aspx

       

      .maintenanceWrapper.ps1 –server <SERVERNAME> –action STOP

       

    6. Verify the server is in maintenance mode and database has moved to the other server.

      To check maintenance mode run the below cmdlet:

      Get-DatabaseAvailabilityGroup -Status | fl Name,serversinmaintenance

            To check the Database mounted on which server run the below cmdlet:

            Get-MailboxDatabase | fl name,Server

     

  2. On Exchange Server Move the Exchange Databases to other Exchange Servers
    1. Open Exchange management shell
    2. Run the following cmdlet

    Move-ActiveMailboxDatabase -Identity ‘DBNAme’ -ActivateOnServer ‘DestinationServer’ -MountDialOverride ‘None’

  3. On Exchange Server Move PAM to other Exchange server
    1. Open Exchange management shell
    2. Run the following cmdlet

      cluster.exe “DagName” group “Cluster Group” /MoveTo:”destinationServer”

 

Verification Tests

Run the following tests on all Exchange servers

  1. Get-queue | ? {$_.MessageCount –gt 5}

    Queue should be less than 10 mails

  2. Test-ServiceHealth

    No service should show in ServiceNotRunning under any role.

        

                 3. Test-ReplactionHealth

                                         Replication should show Passed for all

                 4. Test-OutlookWebServices

                                         No Error should come except the Id 1104

                 5. Test-Mapiconnectivity

                                         This should come success

                 6. Get-mailboxdatabasecopystatus **

                                         Databases should show healthy and mounted.

                 7. Login to OWA using test account and test send and receive of the email.

 

Prabhat Nigam | MVP Exchange

Team @MSExchangeGuru

4 Responses to “How to perform patching for Exchange 2010 in DAG Environment”

  1. Blog Posts of the Week (5th - 11th May 2013) - The South Asia MVP Blog - Site Home - TechNet Blogs Says:

    […] How to perform patching for Exchange 2010 in DAG Environment […]

  2. Wayne Says:

    Great post, so is it wise to leave windows patching frequency so long i.e Monthly ?

  3. Prabhat Nigam Says:

    @Wayne,

    -This blog is a step by step process for patching Exchange servers in DAG cluster.
    -We would recommend following security teams guideline of your environment.
    -Microsoft releases the patches on 2nd Tuesday of every month so 2nd weekend of every month can be good for patching on lab/test servers.
    -If lab/test servers works well then you can choose 3rd weekend of the Month for the Patch on production servers.

  4. Wayne Says:

    Thanks for advice

Leave a Reply

Categories

Archives

MSExchangeGuru.com