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:

SELECT
dbo.v_R_System.Name0,
sw.Name AS [MW Name],
sw.Description,
sw.Duration AS 'Duration Minutes',
sw.IsEnabled AS 'MW Enabled',
dbo.v_R_System.Operating_System_Name_and0
FROM
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 🙂

Advertisements

Leave a Comment here

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

WordPress.com Logo

You are commenting using your WordPress.com 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