A Guide to Enable/Disable Exchange Server Maintenance Mode

Imagine repairing your car’s engine while it’s still running! That’s what updating an Exchange Server without putting it in maintenance mode feels like. Maintenance mode acts like a safety net, preventing data loss and downtime during crucial updates.

Think of it this way: while the update applies, users won’t be able to send or receive emails. But that’s a small price to pay for a smooth, risk-free update process. Skipping this can lead to data disasters like corruption, loss, or server crashes.

The good news is that taking control is easy! This blog will guide you through the step-by-step process of enabling and disabling maintenance mode in Exchange Server. It’s like having a mechanic’s manual for your email server!

Stepwise procedure to enable or disable maintenance mode

Now, we will explore the steps to turn Exchange maintenance mode on or off. First, we will discuss the steps to enable maintenance mode in Exchange Server and then how to turn it off.

How do you enable Exchange Server maintenance mode?

Follow the steps below to enable maintenance mode.

Step 1: Start with setting up the HubTransport service to drain mode.

  • First of all, go to the Exchange management shell and open it as administrator.
  • After that, run the command below to set the draining mode in the server to stop accepting new messages.

Set-ServerComponentState -Identity “YourServerName” -Component HubTransport -State Draining -Requester Maintenance

Step 2: Suspending Cluster Node if your server is part of a (DAG) or Database Availability Group. You can use the below-shared command in the Exchange Management Shell to do this.

Suspend-ClusterNode "YourServerName"

Step 3: You need to turn off the Auto-activation database option to deactivate the database copies during maintenance mode.

Set-MailboxServer "YourServerName" -DatabaseCopyActivationDisabledAndMoveNow $true

Step 4: It’s time to put the Exchange Server in maintenance mode. For this, follow the below-given command.

Set-ServerComponentState "YourServerName" -Component ServerWideOffline -State Inactive -Requester Maintenance

Step 5: Ensure the maintenance mode is activated using the below command.

Get-ServerComponentState -Identity "YourServerName"

That’s all how you can enable maintenance mode. However, once you put the maintenance mode on the server, you must also understand how to turn it off. So, the following section will share the steps to turn off the Exchange maintenance mode.

Take the Exchange server out of maintenance mode

Before following the steps below, we recommend that users open the Exchange Management Shell as administrators. After that, perform the below steps to disable Exchange Server maintenance mode.

Step 1: The first step is to set ServerWideOffline to Active mode using the below command.

Set-ServerComponentState "EX01-2019" -Component ServerWideOffline -State Active -Requester Maintenance

Step 2: If your server is part of DAG, then you need to resume the Cluster NOde.

Resume-ClusterNode -Name "EX01-2019"

Step 3: After that, you need to restore the database copy auto-activation policy with the help of the below command in the Exchange Management Shell.

Set-MailboxServer "EX01-2019" -DatabaseCopyAutoActivationPolicy Unrestricted

Step 4: Now, we will enable the data copy activation.

Set-MailboxServer "EX01-2019" -DatabaseCopyActivationDisabledAndMoveNow $false

Step 5: If your server is not a Database Availability Group (DAG) member, you must activate the HubTransport.

Set-ServerComponentState "EX01-2019" -Component HubTransport -State Active -Requester Maintenance

Step 6: Run the PowerShell command to get active database copies back to their DAG member, as the database copies could move among the DAG members while updating.

.\RedistributeActiveDatabases.ps1 -DagName "DAG01-2019" -BalanceDbsByActivationPreference -SkipMoveSuppressionChecks

Step 7: Lastly, run the command to verify the maintenance mode.

Get-ClusterNode "EX01-2019" Test-ServiceHealth "EX01-2019"

You can turn off the maintenance mode in your on-premises Exchange Server using these steps. However, we recommend users keep a backup of their important data while performing these steps.

Also Read: How to Enable/Disable Exchange ActiveSync in Outlook Android or IOS?

Final Takeaways

This technical blog discusses the stepwise procedure to enable and disable the Exchange Server in maintenance mode. It is crucial to avoid unexpected issues, such as data loss, corruption, etc., while updating Windows security or Exchange Server Cumulative updates. Moreover, these steps can be challenging, and there is a high chance of human error. So, we advise users to use the Shoviv Exchange Recovery Manager to keep a backup copy of the database in a local drive. It will help you prevent data loss or corruption situations in case any step goes wrong. Try its free demo version to check its other features and capabilities by processing the first 50 items per folder for free.

Stuart
Scroll to Top