Microsoft System Center Operations Manager

Configuration Manager Service Window Maintenance Mode Automation Management Pack



              Developed by:  Jason Daggett


                                           Sr. Premier Field Engineer


Without the help, expert advice, insight and technical assistance of these fine individuals, this Management Pack could not have been made possible. Thanks to everyone who assisted & supported these efforts to bring this MP to a reality!


Tom Riddle – System Center Operations Manager & PowerShell Specialist

Geoffrey Guynn – Microsoft Premier Field Engineer

Kevin Holman – Microsoft Principal Premier Field Engineer

James Harper – Microsoft Senior Consultant


Management Pack Description


This management pack was designed with two parts. These parts, contained in a single Rule and one Data Source Method, were broken up to provide System Center Operations Manager with the ability of automatically placing a system into Maintenance Mode using System Center Configuration Manager Service Windows. 

These two parts enable the ability to automatically trigger the Operations Manager Maintenance Mode function based upon the Configuration Manager Service Windows found in the Configuration Manager Agent’s WMI stack.  The scheduled “SCOM Agent Initiated Maintenance Mode Rule for Active SCCM Service Windows” rule, accounts for Service Window overlap, calculates the total service window duration and sends property bag items from the Operations Manager Agent directly to the Management Server that the agent is connected to.


Management Pack Requirements




System Center Operations Manager

System Center Configuration Manager 2012, 2012 R2 & Current Branch

PowerShell 2.0+


Referenced Management Packs







Management Pack Change Log – Revised PowerShell Script (SetSCOMMaintenanceModeViaSCCMServiceWindow.ps1) to resolve issues with Data Packet Errors on Management Server using overrides. - Resolved EventID 22409 running on Management Server once every hour. Also reformated EventIDs to be more readable and contain more information. – Added logic to write out error on Agent side if Duration variable is null, and added logic to if statement for oBag handling to not run if Duration is null. – Included an Override Management Pack that contains a Group that has all systems in it and disables the rule for all the systems in the group.

** See Management Pack Guide for details of use. – Enabled Rule by default, automatically excludes Management Servers from Service Windows Maintenance Mode Automation – Added Error Handling for WMI checks and modified Eventlog to include WhoAmI & Script Runtime. – Initial Release


Management Pack Contents

 Files Included in the Management Pack


** Both files are provided for convenience. Only choose to import the sealed (.mp) or unsealed (.xml) Management Pack.


o   Rule is disabled by default

§  See “Rules” section for information about rules, their use, and when to enabled them



o   Rule is disabled by default

§  See “Rules” section for information about rules, their use, and when to enabled them