Category Archives: DAG

Put your DAG into Maintenance


You install Exchange Cumulative Updates as soon as they arrive, right? You do your daily job while maintaining Mailboxes and Distribution Groups?.
Now it is time to get in touch with the upgrade-process. While you know the details about PAM/SAM from my other blog posts we can directly head over to installing your next Exchange Cumulative Update.

Important things to note prior the upgrade:

  • Disable the OS Anti Virus Engine
  • Disable/Stop Backup Jobs or Windows Services with Active Connections to Exchange
  • Check your AD Backup with repadmin /showbackup
  • Check your Database Backup with Get-Mailboxdatabase -Status | fl Name,*backup*
  • The the above output for “Backup in Progress” Messages.
  • You use a loadbalancer? The the “Real Server” into Maintenance/Disable the Server on the Loadbalancer for new connections
  • You use DNS Round-Robin? Remove the DNS record for the node you want to patch
  • Be aware for some “Relay” DNS records where SMTP devices will send messages.
  • You use Microsoft Operations Manager (SCOM)? or any other monitoring solution? Put your Server into Maintenance!
So now we can start over, right?
Not yet buddy! First we need to set the PowerShell Execution Policy to unrestricted
Set-ExecutionPolicy unrestricted
If your Server do not have Internet Access please disable the option “Check for publisher’s certificat revocation”. This will save you hours of waiting.

Now lets get started with the fun – ready for copy and paste into your environment:

#Define the Server to update
#Define the Server where to move the databases
#Define the DAG Name
 #Set the components into maintenance
Set-ServerComponentState $SERVERNAME –Component HubTransport –State Draining –Requester Maintenance
#Redirect all Messages to the server available during maintenance
Redirect-Message -Server $SERVERNAME -Target $ServerToSwitch
Move-ClusterGroup –cluster $DAGName –name "Cluster Group" –node:$ServerToSwitch
#Suspend the cluster Node
Suspend-ClusterNode –Name $SERVERNAME
#Do not allow to mount databases (PAM and BSCC disabled)
Set-MailboxServer $SERVERNAME –DatabaseCopyActivationDisabledAndMoveNow $true
Set-MailboxServer $SERVERNAME –DatabaseCopyAutoActivationPolicy Blocked
#Set Server Wide Offline for all Components
Set-ServerComponentState $SERVERNAME –Component ServerWideOffline –State InActive –Requester Maintenance
#Move all active Databases to the defined node.

Move-ActiveMailboxDatabase -Server $SERVERNAME -ActivateOnServer $ServerToSwitch

Your EXGuru – aka Peter Forster – aka Satschent Peter

BCS and BCSS – well known for any Exchange Admin


You have seen my last post about Active Manager. You are now familiar with PAM/SAM and BSC and BCSS. For all of you haven’t seen the article I’ll follow up on Best Copy Selection (BSC) and Best Copy and Server Selection (BCSS). BSC was the Exchange 2010 name for BCSS as it is called in Exchange 2013.

As soon as the Active Copy of a Database is no longer available BCSS tries to enable the best available copy. There are a few steps included in this process. One step is to decide the best available copy of the database. This will be done by checking the Mailbox-Server AutoDatabaseMountDial Setting. If the number of missing logfiles is equal or less than the value of AutoDatabaseMountDial Exchange tries to mount the database.
If the value is greater Active Manager tries to find another copy (if they are available) to be activated.

And why I’m discussing all this?
Because it is important during planned maintenance to set the Server into Maintenance that PAM knows not to activate that copy of a database. More about Maintenance will be available soon!


Your EXGuru – aka Peter Forster – aka Satschent Peter

Active Manager? – Never heard, right?


If you are using Exchange 2013 with a DAG setup you are familiar with the PAM or Primary Active Manager, right? And you are more familiar with SAM – the Secondary Active Manager – aren’t you?

The Active Manager runs within MSExchangeRepl.exe and manages the database copy between the Nodes within the DAG. PAM is the instance which decides which copy of a DAG should be Active.

Be aware: Exchange itself is not a clustered application. It just uses the Windows Failover-Cluster technology to do the job.

Important while do a planned upgrade from Exchange to a new Cumulative Update: Note: If your DAG have more nodes, you need first upgrade all non PAM nodes and then upgrade PAM node.

Details about PAM/SAM and more can be found here: Active Manager

Your EXGuru – aka Peter Forster – aka Satschent Peter