How to Configure Maintenance Windows in SCCM

Learn how to use maintenance windows effectively to define when Configuration Manager can run impacting tasks on devices.

Prajwal Desai
Posted by Prajwal Desai
Create Maintenance Windows in SCCM

In this post, we will show you how to configure maintenance windows in SCCM. You can use the Configuration Manager console or the ‘New-CMMaintenanceWindow‘ PS cmdlet to create a maintenance window for a collection.

Most organizations use Configuration Manager to deploy updates to Windows devices. When using the deployment software updates wizard, there is no way to define an exact time for updates that should be installed on clients. You can only define a time when updates become mandatory.

It could cause problems for your users and servers if updates are installed at random times after the deadline. You don’t want the updates to install on domain controllers and reboot them during production hours. To solve these issues, Microsoft has introduced Maintenance Windows.

What is a maintenance window in Configuration Manager?

Using a maintenance window, administrators can define the time period during which ConfigMgr can apply software deployments to devices in a collection. Maintenance windows help make sure that client configuration changes occur during times that don’t affect productivity.

Ad imageAd image

You can create a maintenance window on a device collection but not on an individual workstation or server. Also, remember that you cannot create maintenance windows for the All Systems collection or any built-in device collections.

Configure maintenance windows with an effective date, a start and end time, and a recurrence pattern. The maximum duration of a window has to be less than 24 hours. The console doesn’t allow a single maintenance window longer than 24 hours. For example, if you want to allow maintenance all day Saturday and Sunday, then create two 24-hour maintenance windows for each day.

Support for Maintenance Windows

The following tasks in Configuration Manager support maintenance windows:

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

Multiple maintenance windows

When a client computer is a member of multiple device collections that have maintenance windows, the following rules apply:

  • If the maintenance windows don’t overlap, the client treats them as two independent maintenance windows.
  • If two maintenance windows overlap, the client treats them as a single window for the duration of both windows. For example, you create two maintenance windows on a collection. The first is effective from 9:00 to 10:00, and the second is effective from 9:30 to 10:30. Because they overlap by 30 minutes, the effective duration of the combined maintenance window is 90 minutes, from 6:00 to 7:30.

Configure Maintenance Windows in SCCM

Here is the procedure to configure maintenance windows for a collection in SCCM:

  • In the Configuration Manager console, go to the Assets and Compliance workspace.
  • Select the Device Collections node, and then select a collection.
  • Right-click on the collection and select Properties.
  • Now switch to the Maintenance Windows tab and click on the New Icon.
Configure Maintenance Windows in SCCM
Configure Maintenance Windows in SCCM

When you create a maintenance window, you get the following options to schedule:

  1. Name: Specify a unique name to identify this maintenance window for the collection.
  2. Effective date: This is the date when the maintenance window starts.
  3. Start and End: The start and end times of the maintenance window. The minimum duration is five minutes, and the maximum is 24 hours. The default duration is three hours, from 01:00 to 04:00.
  4. Coordinated Universal Time (UTC): Enable this option for the client to interpret the start and end times in the UTC time zone.
  5. Configure the recurrence schedule:
  6. Apply this schedule to: By default, the MW applies to All deployments. You can select either software updates or task sequences to further control what deployments run during this window.

Click OK to save the settings.

Configure Maintenance Windows in SCCM
Configure Maintenance Windows in SCCM

The Maintenance Windows tab of the collection properties now displays all MW that you have configured.

Configure Maintenance Windows in SCCM
Configure Maintenance Windows in SCCM

Note: You can bypass or ignore the maintenance windows. Select the Software update Installation check box under the Deadline Behavior section on the User Experience tab of a deployment.

Create a Maintenance Window using PowerShell

With the New-CMMaintenanceWindow PS cmdlet, you can create a maintenance window for a collection.

Step 1: First, connect your ConfigMgr to PowerShell. Run the below command to create a new schedule for the maintenance window and save it in the $MWSchedule variable.

$MWSchedule = New-CMSchedule -DayOfWeek Friday -DurationCount 1 -DurationInterval Hours -RecurCount 1 -Start "10/12/2013 21:00:00"

Step 2: The second command creates a maintenance window named MonthlySchedule for the specified collection. You will have to specify the collection ID here. The maintenance window uses the schedule stored in the $MWSchedule variable.

New-CMMaintenanceWindow -CollectionId "MCM00014" -Name "MonthlySchedule" -Schedule $MWSchedule
Create a Maintenance Window using PowerShell
Create a Maintenance Window using PowerShell

Check the Maintenance Windows for a collection

There are three ways to find out if a SCCM-managed device is part of any maintenance window.

  • Find Maintenance Windows using SCCM Report
  • Use a SQL Query to find SCCM Maintenance Windows
  • Check Maintenance Windows using PS cmdlet Get-CMMaintenanceWindow

The following guide provides a detailed description of the three methods mentioned above: Find SCCM Maintenance Windows for a computer.

Find Device Collections with Maintenance Windows

From the Configuration Manager console, you can quickly find out if a device collection has been assigned a maintenance window. In the SCCM console, go to the Assets and Compliance workspace and select Device Collections. Right-click on the main column and select Maintenance Windows.

Find Device Collections with Maintenance Windows
Find Device Collections with Maintenance Windows

The maintenance windows column now shows if a device collection is configured with a maintenance window. If the Maintenance window column for a device collection shows as Yes, it means the MW is configured for that collection. If it shows No, it means there are no maintenance windows configured for that collection.

Find Device Collections with Maintenance Windows
Find Device Collections with Maintenance Windows
Share This Article
Prajwal Desai
Posted by Prajwal Desai
Prajwal Desai is a Microsoft MVP in Intune and SCCM. He writes articles on SCCM, Intune, Windows 365, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.