SCCM

SCCM Maintenance Windows Explained: Why Nothing Installs

A maintenance window is a time slot in which SCCM may install required deployments and restart a computer. If a client has a window, required installs wait for it. An install starts only if its maximum run time fits in the time that is left.

What maintenance windows control

You set a maintenance window on a device collection. Every client in the collection gets it as policy.

Controlled by the windowNot controlled by the window
Required application and package deploymentsPolicy download
Required software update deploymentsContent download to the cache
Required task sequencesUpdate scans and inventory
Restarts that these deployments needInstalls that a user starts in Software Center

Two points follow from this table. Content can download before the window opens, so the install starts at once when it does. And an Available deployment installs when the user asks for it, window or not.

A client with no maintenance window at all has no limit. Required deployments run as soon as their deadline arrives.

Create a maintenance window

  1. In the console, go to Assets and Compliance, Device Collections.
  2. Right-click the collection and select Properties.
  3. Select the Maintenance Windows tab.
  4. Select New.
  5. Set a name, the start, the end and the recurrence.
  6. Under Apply this schedule to, choose the type.
TypeUsed for
All deploymentsApplications, packages, software updates and task sequences.
Software updatesSoftware update deployments only.
Task sequencesTask sequence deployments only.

If a client has both a "Software updates" window and an "All deployments" window, updates install only in the "Software updates" window. A client setting in the Software Updates group can change this, so that updates also use the "All deployments" window.

The window uses the local time of each client unless you tick UTC. Tick UTC when all clients must start at the same moment.

How the client decides whether a deployment fits

The client does not just check that a window is open. It compares two numbers.

  • The time left in the current window.
  • The maximum run time of the deployment.

If the maximum run time is longer than the time left, the install does not start. It waits for the next window that is long enough.

WindowMaximum run timeResult
4 hours, just opened120 minutesStarts.
4 hours, 90 minutes left120 minutesDoes not start. Waits for the next window.
1 hour120 minutesNever starts in this window.

The last row is the classic trap. The default maximum run time of an application deployment type is 120 minutes. A one-hour window can never run it, even if the real install takes two minutes.

Where to set the maximum run time:

  • Application: the deployment type, User Experience tab, Maximum allowed run time (minutes).
  • Package: the program properties, Requirements tab.
  • Software update: the properties of the update, Maximum Run Time tab.
  • Task sequence: the task sequence properties, Advanced tab.

Set the maximum run time close to the real install time, with some room. Too long, and the install never fits. Too short, and SCCM stops watching an install that is still running.

Updates add up. A client with many updates to install needs room for each one. A short window can install some updates and leave the rest for the next window.

Windows from several collections add up

A client can be in many collections. It gets the maintenance windows of all of them. No collection overrides another.

CaseResult
Collection A: Saturday 01:00 to 05:00. Collection B: Wednesday 22:00 to 24:00.The client has two windows. It can install in both.
Collection A: 01:00 to 03:00. Collection B: 02:00 to 05:00, same night.The windows overlap. The client treats them as one window from 01:00 to 05:00.

This is why a server sometimes patches at the wrong time. It is a member of a second collection with its own window, often a test or pilot collection that nobody cleaned up.

You cannot remove a window with another collection. To stop installs at a certain time, take the client out of the collection that has the window, or change that window.

Install outside the maintenance window

A deployment can ignore the window. The options are in the deployment properties, on the User Experience page, under "When the installation deadline is reached, allow the following activities to be performed outside the maintenance window".

OptionEffect
Software installation (for updates: Software Update Installation)The install starts at the deadline, even with no open window.
System restart (if necessary)The restart also happens outside the window.

Think about the two options as a pair. With only the first one ticked, the software installs at the deadline, and the restart waits for the next window. The computer then sits in a pending restart state until then.

Use these options for urgent fixes. Leave them clear for servers that must not restart during work hours.

Business hours in Software Center are a different thing. A user sets them, and they only affect when installs run before the deadline. They are not maintenance windows.

How to see a client's windows

The console shows the windows per collection, not per client. To see what one client really has, look on the client.

Open ServiceWindowManager.log in C:\Windows\CCM\Logs. It lists the windows the client knows, with start time and duration. It also records each check: the run time a deployment asked for, the window type, and whether the deployment may run now.

You can also read the windows from policy with PowerShell. Run this in an elevated window on the client:

Get-CimInstance -Namespace 'root\ccm\Policy\Machine\ActualConfig' -ClassName 'CCM_ServiceWindow' |
    Select-Object ServiceWindowID, ServiceWindowType, Schedules
ServiceWindowTypeMeaning
1All deployments
4Software updates
5Task sequences
6Business hours from Software Center, not a maintenance window

The Schedules value is an encoded schedule string. ServiceWindowManager.log shows the same windows as readable times, so use the log to read the times.

Check a deployment that waits

  1. Open ServiceWindowManager.log. Note the windows and their length.
  2. Find the maximum run time of the deployment.
  3. Compare the two. If the run time is longer than every window, make the window longer or the run time shorter.
  4. Check which collections the client is in, and which of them have windows.
  5. Check the deadline. Before the deadline, a required deployment does not install on its own.
  6. After a change, run Machine Policy Retrieval and Evaluation on the client. See SCCM client actions explained.

For update deployments, also read UpdatesDeployment.log. It shows that the deployment is waiting for a window. For applications, the full flow is in how to troubleshoot a failed SCCM application deployment.

SCCM MECM maintenance windows deployments ServiceWindowManager.log software updates
✉

Get new articles in your inbox

SCCM guides, AI tools, automation tips — sent when published. No spam.

Keep reading

Comments