Putting a group of servers into maintenance mode

Putting a group of servers into maintenance mode is a pretty common requirement. For example, you’re about to push out a patch to a group of servers that will require a reboot, and you don’t want SCOM to raise any alerts during this period.

In theory, this shouldn’t be difficult to do. Any object in SCOM can be put into maintenance mode (and put all of the contained objects into maintenance mode too). And groups in SCOM are just another kind of object. So putting a group into maintenance mode should be easy, right?

Unfortunately, there is no task in the SCOM administration console to put an entire group into maintenance mode. Instead you have to find and select the individual objects and put those into maintenance mode.

Using PowerShell, the story is no less complicated.

In 2007 R2 you could combine Get-MonitoringClass, Get-MonitoringObject and New-MaintenanceWindow, as described in this article by Steve Rachui: Place a Group in Maintenance Mode with Powershell.

In 2012, the Start-SCOMMaintenanceMode cmdlet does not put the contained objects into maintenance mode, which makes it much less useful. Instead, you have to drop down to using the .NET ScheduleMaintenanceMode method, as described in this article by Pete Zerger: OpsMgr 2012: Group Maintenance Mode via PowerShell (the way it should be)

In SquaredUp Operations – our lightweight web interface for SCOM – any object can be put into maintenance mode, including groups. Simply find the group and enable maintenance mode, just like you would with a single server or any other logical component.

This works in exactly the same way for an entire distributed application – useful if you know an entire application will be offline and need to pause all monitoring associated with it.

An added benefit of having this in a lightweight web interface is that you can easily push maintenance mode control out to other teams in your IT organisation. With the right role-based access control in place, you can give maintenance mode control directly to those who manage the system maintenance.