I ran into an issue when attempting to install Exchange 2010 SP2 on a two member dag. It turns out you can’t use the StartDAGServerMaintenance.ps1 and StopDAGServerMaintenance.ps1 scripts on a two node DAG because the 2nd part of StartDAGServerMaintenance fails to complete its tasks and cannot put the node into maintenance mode (although it does move the databases). Below is the procedure I used to manually put the DAG member into maintenance mode so I could install Exchange 2010 SP2. In the example MB-DAG2 is the member I wanted to put into maintenance mode, MB-DAG1 is the other node, and DAG.DOMAIN.COM is the DAG fqdn.
Verify that at least one other non-lagged copy of the replicated database(s) is healthy.
Move the databases to another node:
Move-ActiveMailboxDatabase -Server DAG-MB1 -Confirm:$FALSE
Move the cluster core resources to another node:
cluster dag.domain.com group "Cluster Group" /moveto:DAG-MB1
Pause the cluster node:
cluster dag.domain.com node DAG-MB1 /pause
Set the DatabaseCopyAutoActivationPolicy of the node to BLOCKED.
Set-MailboxServer -Identity DAG-MB1 -DatabaseCopyAutoActivationPolicy:BLOCKED
Suspend all individual database copies for activation.
Get-MailboxDatabaseCopyStatus *\DAG-MB1 | Suspend-MailboxDatabaseCopy -ActivationOnly:$TRUE
This is where you perform server maintenance (install Exchange 2010 SP2) on that the MB-DAG1 node. When the service pack install finished, I took the node out of maintenance:
Resume the node:
cluster dag.domain.com node DAG-MB1 /resume
Move the cluster resources back to the other node:
cluster dag.domain.com group "Cluster Group" /moveto:DAG-MB2
Resume the DB replication:
Get-MailboxDatabaseCopyStatus *\DAG-MB2 | Resume-MailboxDatabaseCopy
Done. Now repeat these steps for the other DAG member.