Create SCCM Maintenance Windows for Clients Reports

Let’s see how to create SCCM maintenance Windows for clients. This post also helps to review the SCCM client maintenance windows overlap and reports. The SCCM device collection is the place where you need to define a preventive maintenance window.

There are a quiet of few maintenance options available in SCCM. I normally like to segregate the maintenance options based on the client and server sides. The SCCM client-side maintenance is the topic that you will learn from this post.

The client maintenance windows help to let SCCM make sure that client configuration changes occur during times that don’t affect productivity. All the functionalities, activities, or workflows of SCCM clients can’t be managed with maintenance window configuration.

The maintenance window reporting is important to understand. The reporting options help to find the SCCM client maintenance windows. The creation and maintenance reports are important for troubleshooting. The overlap of the maintenance window could cause issues.

Patch My PC

What is SCCM Maintenance Windows for Clients

Let’s find out what is SCCM Maintenance Windows(MW) for Clients. In Windows 10/11 systems management, a maintenance window is a period of time designated for preventive maintenance in advance by the system admins. During this window, the system admins could cause disruption of service for SCCM clients.

SCCM Device collections are places where the system admin configures maintenance windows for the client. All the members of that particular collection will get assigned with the same maintenance window. You can define the maintenance window schedule as any other workflow schedule in SCCM.

Create SCCM Maintenance Windows for Clients Reports 1
Create SCCM Maintenance Windows for Clients Reports 1

The end users can check the maintenance window details from the Software Center client. This is useful because the end-user can find out when the PC could install apps/patches or restart because of some maintenance questions.

NOTE! – The maximum allowed duration of maintenance windows is 24 hours; if you have to entire weekend as a maintenance window, you have to create two schedules.

Adaptiva

The following are the supported workflows/features in SCCM that support client maintenance windows.

  • Application and package deployments
  • Software update (patch) deployments
  • Compliance settings deployment and evaluation
  • OS and custom task sequence deployments

NOTE! The user can start the installation anytime, which overrides the administrator’s choices of the maintenance window.

Create SCCM Maintenance Windows for Clients Reports 11
Create SCCM Maintenance Windows for Clients Reports 11

Overlap of Maintenance Windows

Let’s check the Overlap of Maintenance Windows if the client is part of more than one maintenance window. The client can get different MW policies from different device collections. A device can have multiple maintenance windows (MW).

SCCM has a strong logic to handle the overlap of maintenance windows. The client treats the overlap as a single window for the entire time of both maintenance windows.

  • MW #1 – 10:00 PM to 11:00 PM
  • MW #2 – 10:30 PM to 12:30 AM
  • Resultant Maintenance Window = 10:00 PM to 12:30 AM.

How to Create SCCM Maintenance Windows

Let’s learn how to create SCCM Maintenance Windows for clients. As mentioned above, the device collection is where you will set the maintenance window for SCCM clients.

I normally suggest having different MW for different sets of devices. Create one set of MW for server devices and other sets of maintenance windows (MW) for Windows 10/11 devices.

It’s also worth splitting the MW based on the types of devices Laptops, Desktops, or Virtual Desktops. It’s worth looking at specific MW configurations to handle special scenarios. Follow the below steps to configure/create SCCM MW.

  • Launch SCCM Admin console.
  • Navigate to \Assets and Compliance\Overview\Device Collections.
  • Select the Device Collection where you want to create or configure Maintenance Window(MW).
  • Right-Click on the device collection -> Properties.
  • Click on the Maintenance Windows tab.
  • Click on the Star (*) symbol.
Create SCCM Maintenance Windows for Clients Reports 2
Create SCCM Maintenance Windows for Clients Reports 2

Start Date and Duration of SCCM Maintenance Window

Let’s create a new maintenance schedule from the standard schedule options available in SCCM. This schedule window has some additional options if you compare it with the application or Task Sequence schedule window.

  • Enter the Name of the MW -> HTMD MW Test #2
  • Configure the Time Schedule of the MW.
    • Effective Date: Start Date or Date of MW -> 23rd May 2022.
    • Start Time – > 10:00:00 PM
    • End Time -> 12:30
    • Duration -> will get populated automatically. 3 hours 0 minutes.
Create SCCM Maintenance Windows for Clients Reports 3
Create SCCM Maintenance Windows for Clients Reports 3

Recurrence Schedule of Maintenance Window

In this section, let’s set up the recurrence of the maintenance window (MW) schedule. It’s worth configuring the recurrence of MW in 99.99% of scenarios.

These are the standard SCCM recurrence schedule options. There is no change from the standard recurrence schedule in SCCM.

  • Configure Recurrence schedule:
    • None -> To set a One-time recurrence schedule for MW.
    • Monthly -> To set monthly MW.
    • Weekly -> To set weekly MW.
    • Daily -> To set daily MW.

You can define a daily, weekly, monthly, or one-time recurrence schedule for MW. You get different granular SCCM maintenance window schedule options for each of the schedules, as you can clearly see in the screenshot below.

Create SCCM Maintenance Windows for Clients Reports 4
Create SCCM Maintenance Windows for Clients Reports 4

SCCM Client Maintenance Windows – Offset Schedule Options

Let’s see what is the latest with SCCM Client Maintenance Windows schedule options. The offset schedule options are coming into production soon. I think in the next release of SCCM production version 2207. It’s already there in Technical Preview.

Offset schedule options are already available in some other SCCM workflows such as ADR (as explained in the ADR guide). The offset schedule for the second patch Tuesday for example is coming to the SCCM Maintenance window (client-side) as well. This is really nice addition!

Create SCCM Maintenance Windows for Clients Reports 12 - Credits to Microsoft
Create SCCM Maintenance Windows for Clients Reports 12 – Credits to Microsoft

SCCM Deployment Workflow Specific Maintenance Windows

You can also select the specific maintenance window (MW) for workflows. There are three (3) options available, as you see in the below list. The default value is All Deployments which means this MW is applied to all the deployments.

For example, if you select Software Updates, the maintenance schedule is applied only to Software Updates. The Task Sequence deployment happens outside of that maintenance schedule as well.

  • All Deployments
  • Software Updates
  • Task Sequence
Create SCCM Maintenance Windows for Clients Reports 5
Create SCCM Maintenance Windows for Clients Reports 5

Click the OK button to complete the creation of SCCM MW. This process can be repeated if you want to create different maintenance windows for the same device collection. I have already explained how the overlap of the maintenance schedule works in the previous section.

Create SCCM Maintenance Windows for Clients Reports 6
Create SCCM Maintenance Windows for Clients Reports 6

Find Device Collections with Maintenance Windows Configured

Let’s find Device Collections with Maintenance Windows Configured in this section. It’s easy to figure this out from the admin console itself. You can refer to the Maintenance Windows column under the following path.

  • Navigate to \Assets and Compliance\Overview\Device Collections
  • Right-click on the column heading and add the Maintenance Windows column, as shown in the screenshot below.
  • YES -> Means MW is configured.
  • NO -> Means the MW is NOT configured.
Create SCCM Maintenance Windows for Clients Reports 7
Create SCCM Maintenance Windows for Clients Reports 7

Find List of Maintenance Windows of SCCM Clients Using Reports

Using reports, let’s find the list of maintenance windows (MW) of SCCM clients. It’s important to understand the WM configuration of the client when you run into deployment delays of Task Sequence or Applications or Packages.

You can use SCCM default reports to find the details of MW of individual clients. I don’t know how much-added value it gives if you want to find the WM details of 100s of clients. But the following report is the starting point.

Let’s go through the below steps:

  • Navigate to \Monitoring\Overview\Reporting\Reports
  • Search with the keyword “Maintenance.”
  • Right-Click on the “Maintenance windows available to a specified client” report and select the RUN button.

All the details of the maintenance window for that particular client are available in this report, as you can see in the screenshot below.

Create SCCM Maintenance Windows for Clients Reports 8
Create SCCM Maintenance Windows for Clients Reports 8

SQL Query to Find the Full List of Devices with Maintenance Windows

Let’s check the SQL query to Find the Full List of Devices with Maintenance Windows. From this report, you would be able to get all the devices with an MW enabled. The default report mentioned above is only for individual clients.

You need to run the following query from the SQL Server Management Studio to get the results. You can also create a custom report using the report builder.

  • Open the SQL Management Studio.
  • Click on the New Query button.
  • Select the CM_MEM database from the drop-down menu.
    • MEM is the ConfigMgr site code.
SQL Query to Find the Full List of Devices with Maintenance Windows
SQL Query to Find the Full List of Devices with Maintenance Windows

You can copy the following SQL query to find all the devices with the Maintenance Window enabled. You can click on the Execute button to show the results.

select fcm.Name as 'Compuer Name', sw.Name as 'MW Name', sw.Description, sw.StartTime, sw.Duration as 'DurationMinutes', 
sw.IsGMT as 'StartTimeIsGMT', sw.IsEnabled as 'MW Enabled'
from v_ServiceWindow sw 
join v_FullCollectionMembership fcm on sw.CollectionID = fcm.CollectionID
Create SCCM Maintenance Windows for Clients Reports 9
Create SCCM Maintenance Windows for Clients Reports 9

PowerShell Options with SCCM Maintenance Windows

Let’s find out PowerShell Options with SCCM Maintenance Windows. There are four (4) supported PowerShell Command lets to create, update, view, or delete the SCCM MW.

  • Get-CMMaintenanceWindow
  • New-CMMaintenanceWindow
  • Remove-CMMaintenanceWindow
  • Set-CMMaintenanceWindow

You can use the Get-CMMaintenanceWindow command to view the MW details of a particular device collection. It doesn’t work well to get the details of individual device schedules. You must rely on WMI methods to get that kind of granular details through scripting.

  • Launch the SCCM PowerShell module.
  • Run the following PS Command to view the MW schedule for a particular device collection.
  • Make sure to change the Collection ID.
Get-CMMaintenanceWindow -CollectionID "MEM0003A" | Where-Object { $_.IsEnabled }
Create SCCM Maintenance Windows for Clients Reports 10
Create SCCM Maintenance Windows for Clients Reports 10

Author

Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is Blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.