Schedule SCOM Maintenance Mode by PowerShell GUI Tool
This article describes a PowerShell GUI tool I created for managing System Center Operations Manager (SCOM) maintenance mode scheduling. The standard SCOM console has performance issues in large environments, so this tool provides a faster alternative.
Main Features
Server Search and Selection
The tool enables users to search Windows servers with wildcard support. Leaving the name field blank displays all servers within SCOM.
Maintenance Mode Configuration
Users can specify duration (minimum 5 minutes) or select a specific end time. The tool prioritizes explicit end times over calculated durations. A separate Windows Forms dialog provides DateTimePicker functionality, as WPF lacks this native control.
The default Maintenance Mode Reason is Other (Planned). Comment is not required.
Stop Maintenance Mode
A dedicated tab allows users to terminate active maintenance mode on selected servers.
Scheduled Maintenance (Updated 01/03/2018)
The update added scheduling capability to support SCOM 2012 R2, which lacks native scheduling. The implementation uses PowerShell Scheduled Jobs:
New-JobTriggerfor timingRegister-ScheduledJobto create jobsUnregister-ScheduledJobto clean up after execution- Windows Task Scheduler integration
Technical Requirements
- SCOM 2012 R2, Windows Server 2012 R2, PowerShell v4.0 (tested)
- Execution requires account privileges in SCOM
- Script available on GitHub
Important: Remember to change the SCOM Management Server variable before you run it.