Putting hosts in Maintenance mode through the SCOM console is not the fasted way when you have more than 1 host on which you want to activate Maintenance Mode and when the host is also part of a cluster it’s not enough to only add a maintenance window for that host. You will still receive cluster alerts from the cluster on where the host resides. So today I created the first version of my own Maintenance Mode script. The script has the following functionality:
- Put a host or Group in Maintenance Mode
- Checks if the host is part of a cluster, if yes the script will also put the Cluster in Maintenance Mode including all Cluster Resources.
CAUTION: If you don’t want to put the corresponding cluster in Maintenance Mode you have to edit this script!
NOTE: This is the first version of the script. The following still needs to be done:
- Better checking functionality (Error and Already MM activated)
- Stopping Management Mode function
The script can be downloaded here.
Before using the script you have to change this line:
$MgntSrv = "Your SCOM Management Server"
Replace ‘Your SCOM Management Server’ with one of your own Management Servers!
This script is based on the following posts: