Maintenance Mode GUI

Putting  objects into maintenance mode in Operations Manager can be a cumbersome experience if you're not to familiar with operations manager.

If I wish to put a computer into maintenance mode, normally I'd have to open up the console and put it into maintenance mode in three different places. First you get into the computer view, select the computer, put this into maintenance mode, and afterwards you'll have to repeat this steps twice more in the discovered inventory view for the 'health service' target and the 'health service watcher' target for the specific computer.

In my search for a solution to this problem a came upon several great powershell scripts which do this for you all at once. Boris Yanushpolsky wrote a script to put an agent into maintenance mode which can be found here.

He also wrote a Group Maintenance mode script to put an entire group into maintenance mode all at once. This script is found here.

Then there are various versions like a group maintenance mode script which asks for input, and a web-based maintenance mode by Steve Rachui. These are all great and very useful scripts. I'm very charmed by the graphical interpretation of the web based maintenance mode but I didn't really want to install a separate website.

There are several people at our company who have to perform maintenance tasks in the monitored environment. Not all of them are familiar with powershell or the operationsmanager console.

Therefore I was looking for a HTA-style solution without the need to install additional components. Powershell however is not supported in HTA's... what a shame.

What is supported in powershell is windows forms.


So I decided to give it a try, and I combined the agent maintenance mode script and the group maintenance mode scripts in a graphical form so that people no longer need to be familiar with powershell or the operations manager console.


This is what it looks like:

Single Computer MM

First you enter the RMS to connect to. Should you be on a computer not in the domain, it will ask for credentials. Then decide whether you want to put a single computer or a group of computers into maintenance mode. Select the maintenance target, give a time (a minimum of 5 minutes like in the operations manager console) and provide a comment.

At this moment the script will return an error if no comment is entered.

You can now press start maintenance.

When ready you can press Stop maintenance to end the maintenance mode for the selected target.


If you wish to put a group of computers into maintenance mode, you select 'Group':


Group MM


In this case the maintenance target is the SQL Computers group which as can be seen contains 2 computers. When you press Start maintenance the script detects one of them is a management server. Management servers cannot be put into maintenance mode with this script.

The other computer is still put in maintenance mode.

What's needed on the local computer is powershell and the opsmgr shell. If you do not wish to install the operations manager components it is possible to follow 'Derek ops manager'-'s guide to achieve this.

You can download the Maintenance mode GUI here.

To use it, just place the script in a directory of your choosing and create a shortcut to the script as described in this scripting guys article .

Should you encounter any bugs/problems or if you have any questions, please let me know and i'll try to answer them. Have fun.

Joomla-Template by &