Turning Exchange 2013/2016/2019 Out Of Maintenance Mode
Turning Exchange 2013/2016/2019 Out Of Maintenance Mode
This process has been applied successfully in an Exchange 2016 production environment.
Below is the process to take out the Exchange Server from the Maintenance Mode.
- Run the below command to take out the Exchange Server from the Maintenance Mode
[PS] C:\>Set-ServerComponentState “EXCH002” -Component ServerWideOffline -State Active -Requester Maintenance
- Resume the Cluster Node
[PS] C:\>Resume-ClusterNode -Name “EXCH002”
Name ID State
—- — —–
EXCH002 1 Up
- Run the DatabaseCopyAutoActivationPolicy
[PS] C:\>Set-MailboxServer “EXCH002” -DatabaseCopyAutoActivationPolicy Unrestricted
- Run the DatabaseCopyActivationDisabledAndMoveNow command to activate the Database Replication for the node.
[PS] C:\>Set-MailboxServer “EXCH002” -DatabaseCopyActivationDisabledAndMoveNow $false
- Allow the HubTransport role to accept messages.
[PS] C:\>Set-ServerComponentState “EXCH002” -Component HubTransport -State Active -Requester Maintenance
- Run the command to verify that the node is UP.
[PS] C:\>Get-ClusterNode “EXCH002”
- Run the below command to verify all the nodes are up in the cluster.
[PS] C:\>Get-ClusterNode
- Test the health status of the Exchange Server Node
[PS] C:\>Test-ServiceHealth “EXCH002”
Role : Mailbox Server Role
RequiredServicesRunning : True
ServicesRunning : {IISAdmin, MSExchangeADTopology, MSExchangeDelivery, MSExchangeIS, MSExchangeMailboxAssistants, MSExchangeRepl, MSExchangeRPC, MSExchangeServiceHost,
MSExchangeSubmission, MSExchangeThrottling, MSExchangeTransportLogSearch, W3Svc, WinRM}
ServicesNotRunning : {}
Role : Client Access Server Role
RequiredServicesRunning : True
ServicesRunning : {IISAdmin, MSExchangeADTopology, MSExchangeMailboxReplication, MSExchangeRPC, MSExchangeServiceHost, W3Svc, WinRM}
ServicesNotRunning : {}
Role : Unified Messaging Server Role
RequiredServicesRunning : True
ServicesRunning : {IISAdmin, MSExchangeADTopology, MSExchangeServiceHost, MSExchangeUM, W3Svc, WinRM}
ServicesNotRunning : {}
Role : Hub Transport Server Role
RequiredServicesRunning : True
ServicesRunning : {IISAdmin, MSExchangeADTopology, MSExchangeEdgeSync, MSExchangeServiceHost, MSExchangeTransport, MSExchangeTransportLogSearch, W3Svc, WinRM}
ServicesNotRunning : {}
- Test the health status of all the Exchange Server in the DAG.
[PS] C:\>Get-ExchangeServer | Test-ServiceHealth
- Test the MAPI connectivity on the node, which is upgraded.
[PS] C:\>Test-MAPIConnectivity -Server “EXCH002”
MailboxServer Database Result Error
————- ——– —— —–
EXCH002 DB1 Success
EXCH002 DB2 Success
EXCH002 DB3 Success
EXCH002 DB4 Success
EXCH002 DB5 Success
- Test the MAPI connectivity on all the Exchange nodes.
[PS] C:\>Get-ExchangeServer | Test-MAPIConnectivity
- Check the database copy status on the upgraded node.
[PS] C:\>Get-MailboxDatabaseCopyStatus -Server “EXCH002” | Sort Name | Select Name, Status, Contentindexstate
Name Status ContentIndexState
—- —— —————–
DB1\EXCH002 Mounted Healthy
DB2\EX02 Mounted Healthy
DB3\EXCH002 Mounted Healthy
DB4\EX02 Mounted Healthy
DB5\EXCH002 Mounted Healthy
- Check the database copy status on all the Exchange Nodes
[PS] C:\>Get-MailboxDatabaseCopyStatus * | Sort Name | Select Name, Status, Contentindexstate
- Test the Replication Health Status
[PS] C:\>Get-DatabaseAvailabilityGroup | Select -ExpandProperty:Servers | Test-ReplicationHealth | Sort Name
- Verify the DatabaseCopyAutoActivationPolicy is Unrestricted on the upgraded node.
[PS] C:\>Get-MailboxServer “EXCH002” | Select Name, DatabaseCopyAutoActivationPolicy
Name DatabaseCopyAutoActivationPolicy
—- ——————————–
EXCH002 Unrestricted
- Verify the DatabaseCopyAutoActivationPolicy is Unrestricted on all the Exchange nodes.
[PS] C:\>Get-MailboxServer | Select Name, DatabaseCopyAutoActivationPolicy
- Rebalance Database distribution across the DAG Members
[PS] C:\Windows\system32>cd $exscripts
[PS] C:\Program Files\Microsoft\Exchange Server\V15\scripts>.\RedistributeActiveDatabases.ps1 –DagName “DAG001” –Balance DbsByActivationPreference -SkipMoveSuppressionChecks
Comments (4)
Aziz
Very useful information
Thank you Mr. Ammar
Amir Moiz Gulamaliwala
You’re welcome Aziz 🙂
Rabih
you didn’t mention the needed commands for single exchange server .
in your previous post you mention that :
https://ammar.cloud/turning-exchange-2013-2016-2019-into-maintenance-mode/
Amir Moiz Gulamaliwala
Hello Rabih,
If you have a single Exchange Server then directly run the ServerWideOffline command mentioned in Step 9. Thanks