Every once in a while you will have to perform maintenance (e.g. installing updates, troubleshooting, hardware maintenance) on your Exchange 2013 servers. In the past, you had to schedule proper downtime and do manual changes to configurations for this to work properly. Exchange 2013 SP1 introduced "Maintenance mode", allowing your Exchange 2013 servers to be put in maintenance mode. This allows you to perform maintenance on a server without the end users noticing it's gone, or without having to schedule downtime.
Maintenance mode was designed for mailbox servers (i.e. servers that have the mailbox role, either standalone or multi-role). However, it's worth noting that putting a server into maintenance mode does not affect CAS components: clients will still be able to access services such as OWA, EWS, ... E.g. in case of a load balancer, you need to exclude the server in maintenance so clients do not connect to the wrong server.
Maintenance mode can be activated regardless of the presence of DAG, although there are some extra steps involved for DAG members, as we need to prevent automatic failover and make the remaining DAG members the active server for the databases.
You need an account that has Organization Management access, and have access to the Exchange Management Shell.
Log on to any Exchange server using EMS, then follow the steps below, replacing parameters as needed.
Set-ServerComponentState <ServerName> -Component HubTransport -State Draining -Requester Maintenance
Restart-Service MSExchangeTransport
Restart-Service MSExchangeFrontEndTransport
Redirect-Message -Server <ServerName> -Target <OtherMailboxServerFQDN>
Suspend-ClusterNode <ServerName>
Set-MailboxServer <ServerName> -DatabaseCopyActivationDisabledAndMoveNow $True
Get-MailboxServer <ServerName> | Select DatabaseCopyAutoActivationPolicy
Set-MailboxServer <ServerName> -DatabaseCopyAutoActivationPolicy Blocked
Set-ServerComponentState <ServerName> -Component ServerWideOffline -State Inactive -Requester Maintenance
You can verify whether the server is in maintenance mode by running this in the EMS:
Get-ServerComponentState <ServerName> | FT Component,State –Autosize
All components should be "Inactive", except for Monitoring and RecoveryActionsEnabled.
Log on to any Exchange server using EMS, then follow the steps below, replacing parameters as needed.
Set-ServerComponentState <ServerName> -Component ServerWideOffline -State Active -Requester Maintenance
Resume-ClusterNode <ServerName>
Set-MailboxServer <ServerName> -DatabaseCopyActivationDisabledAndMoveNow $False
Set-MailboxServer <ServerName> -DatabaseCopyAutoActivationPolicy Unrestricted
Set-ServerComponentState <ServerName> -Component HubTransport -State Active -Requester Maintenance
Restart-Service MSExchangeTransport
Restart-Service MSExchangeFrontEndTransport
You can verify whether the server is out of maintenance mode by running this in the EMS:
Get-ServerComponentState <ServerName> | FT Component,State –Autosize
All components should be "Active".
« ‹ | November 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |