Overview

Maintenance Windows in ConfigMgr can help you a great deal to determine when installations will occur on your clients. Since the Maintenance Windows are configured per a collection basis, it’s recommended to have dedicated Maintenance Windows collection where you use the Include rule for collection membership. But this may not always be the case, and in some environments Maintenance Windows can be configured on a variety of collection, and in the end it might be quite hard to find out the enabled Maintenance Windows the device has. It would be nice if you’d have such a tab in the Device propertieswindow, but unfortunately we don’t have such a luxury (yet).

This is where our friends PowerShell and the SMS Provider comes to the rescue. Since we can determine what collections the device is a member of by querying theSMS_FullCollectionMembership WMI class, it’s from there on quite easy to see which collections the device is a member of. And when we know that, we can query each collection for the Maintenance Window it has configured.

So I decided to create a right-click console extension that can show all the Maintenance Windows that affects a specific device. But since this functionality is already present inPeter van der Woude’s great tool, Peter gave me the idea to also show the upcomingMaintenance Windows. I figured this was a great addition to what I had decided to go with from the start, and set out for trying to figure out how to accomplish the upcomingMaintenance Windows part. It proved to be a difficult task from the start, but now when I look back at the code, it wasn’t really that hard after all.

Install the tool

The full documentation of this tool can be found on my blog here.