SCCM – Find all servers that have a Mantenance Window

In case you need to find the Maintenance Windows assigned to all your servers, here is a short SQL query for the SCCM Report:

sw.Name AS [MW Name],
sw.Duration AS 'Duration Minutes',
sw.IsEnabled AS 'MW Enabled',
dbo.v_ServiceWindow AS sw INNER JOIN
dbo.v_FullCollectionMembership AS fcm ON sw.CollectionID = fcm.CollectionID INNER JOIN dbo.v_R_System ON fcm.ResourceID = dbo.v_R_System.ResourceID
ORDER BY [MW Name], dbo.v_R_System.Name0

You can be suprised finding that some of your servers belong to several MWs 🙂


Leave a Comment here

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s