Taking the Exchange Server 2019 back to operational mode is an easier task. Less command to be executed than Enabling Exchange Server 2019 Maintenance.

This tutorial will take you through the steps to put Exchange Server 2019 back to operation and disable Exchange maintenance mode.

Steps to Disable Exchange Maintenance Mode

  • Set the ServerWideOffline to Active.
  • Resume Cluster Node.
  • Restore the DatabaseCopyAutoActivationPolicy settings.
  • Disable DatabaseCopyActivationDisabledAndMoveNow.
  • Activate the HubTransport.

Enabling Exchange ServerWideOffline Component.

Starting with enabling ServerWideOffline and setting it back to Active. This will Activate all the Exchange Server components except for the HubTransport, which was set to Drain.

PS C:\> Set-ServerComponentState dev-ex -Component ServerWideOffline -State Active -Requester Maintenance

Most the the Set- commands return nothing if the execution was successfully

You can see all the server components and their status by running the command Get-ServerComponentState -id <YourServer>.

Its recommend to confirming the result by using a similar command with the Get- verb

PS C:\> Get-ServerComponentState dev-ex -Component ServerWideOffline

Server                Component         State 
------                ---------         ----- 
dev-ex.Dev-Test.local ServerWideOffline Active
ServerWideoffline
ServerWideOffline Component

The State is Active, this means that the Exchange server components are functioning again, except the Hubtransport, which we will enable later on.

Resuming The Exchange Cluster Node

One important thing is Cluster Management, we need to resume the cluster node so the server can accept failover request. Run the following command:

PS C:\> Resume-ClusterNode dev-ex

Name                 ID    State                                                                                                                                                                                                                                 
----                 --    -----                                                                                                                                                                                                                                 
dev-ex               1     Up   

Make sure that the State of the Node is Up

Make sure that you have FailoverClusters Powershell Module installed

Exchange Mailbox Server Activation Policy

Now the server almost ready, But we still need to configure some options related to the Activation policy.

PS C:\> Set-MailboxServer dev-ex -DatabaseCopyAutoActivationPolicy Unrestricted 
#Or whatever the value was before placing the server in maintenance mode

The command Set-MailboxServer with the parameter DatabaseCopyAutoActivationPolicy will set your mailbox server to accept mailbox database activation requests. The DatabaseCopyAutoActivationPolicy accept one of the following:

  • Blocked: It will prevent a database from getting activated on the server.
  • IntrasiteOnly: Allow activation on the same site (HQ not in DR).
  • Unrestricted: unrestricted activation, anywhere DR or HQ.

Assuming the server is already in maintenance mode, so the return of the Get-MailboxServer dev-ex | select DatabaseCopyAutoActivationPolicy should be Blocked
But even if it was not Blocked, it’s still OK to use the same command Set-MailboxServer dev-ex -DatabaseCopyAutoActivationPolicy Unrestricted

PS C:\> Set-MailboxServer dev-ex -DatabaseCopyActivationDisabledAndMoveNow $false

Disable the DatabaseCopyActivationDisabledAndMoveNow and set it to $false. This parameter will allow the Mailbox Server to accept database move requests. To confirm the result, run the following command

PS C:\> Get-ExchangeServer | Get-MailboxServer | select name,DatabaseCopyActivationDisabledAndMoveNow

Name   DatabaseCopyActivationDisabledAndMoveNow
----   ----------------------------------------
DEV-EX                                    False

To confirm that all the database activation policies are good and applied, run the following command, the return result should be as below:

PS C:\> Get-MailboxServer dev-ex | select DatabaseCopyActivationDisabledAndMoveNow,DatabaseCopyAutoActivationPolicy

DatabaseCopyActivationDisabledAndMoveNow DatabaseCopyAutoActivationPolicy
---------------------------------------- --------------------------------
                                   False                     Unrestricted
Get-MailboxServer result
Get-MailboxServer result

Activating HubTransport Exchange Component.

By now we are all good to go and ready to unlock the last piece of the activation, enabling the HubTransport Components

PS C:\> Set-ServerComponentState dev-ex -Component HubTransport -State Active -Requester Maintenance

The Set-ServerComponentState will enable the Hubtransport Server Components, and this is considered the final step of taking your exchange server off maintenance mode and put it to fully functional mode.

To Confirm the result, run the following command, the result should be as below

PS C:\> Get-ServerComponentState dev-ex -Component HubTransport
Server                Component    State 
------                ---------    ----- 
dev-ex.Dev-Test.local HubTransport Active

During placing the server in maintenance mode, we moved all the databases to another server and as this server now ready, we need to place the databases back to it again.

Using the RedistributeActiveDatabases.ps1 is considered the best approach and the easiest, the redistribution will be based on Activation Preference. The RedistributeActiveDatabases.ps1 can be found in the exchange installation directory \Scripts

.\RedistributeActiveDatabases.ps1 -DagName MyDagName -BalanceDbsByActivationPreference

Conclusion…

Now Exchange Server is ready to receive the load safely, keep your eyes on Windows Eventlog to see if there is an unexpected behavior so it can be fixed.

Also dont forget the Load Balancer to include this server with the Load Balance farm.

Rate this post