27.6 C
Ahmedabad
Friday, July 4, 2025

List all Servers with Maintenance Windows

Default report to show all servers that have collection maintenance windows:

for cross checking servers in multiple maintenance windows

Below is query help to find set Maintenance windows for all the server.

List Computers with Maintenance Window:

SELECT sw.Name AS [MW Name], sw.Description,

sw.StartTime,

sw.Duration AS Duration Minutes,

sw.IsEnabled AS MW Enabled,

sys.Name0 AS ServerName,

sys.Operating_System_Name_and0 AS OperatingSystem

FROM dbo.v_ServiceWindow AS sw INNER JOIN

dbo.v_FullCollectionMembership AS fcm ON sw.CollectionID = fcm.CollectionID

INNER JOIN dbo.v_R_System sys ON fcm.ResourceID = sys.ResourceID

WHERE (sys.Operating_System_Name_and0 LIKE server%)

ORDER BY [MW Name], sys.Name0

Output will be:

Happy Learning!!!

Thanks&regards,
Haresh Hirani
Email: [email protected], [email protected]
Facebook https://www.facebook.com/Hiraniconfigmgr-120189361980772/
Follow us: https://www.linkedin.com/in/hiraniconfigmgr 
Twitter: https://twitter.com/hiraniconfigmgr

Author

  • Hi, I Haresh Hirani, I am the person behind this webpage. Welcome to my page, Thank you for visiting the website and my page! My website is all about Microsoft technologies. More about ConfigMgr and all other technologies which are interesting for me. However, larger percentage of my posts are related to SCCM. Normally, like to post the interesting issues which I came across in my day to day tech life. you will find only solutions which comes on my day to day life.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest posts