Thursday, October 24, 2013

SQL Query to List Collections with Maintenance Windows - ConfigMgr 2012

  Hi folks.. Have you ever worked with numerous collections with multiple maintenance windows? If it yes, probably you would know that to check the maintenance windows for each and every collection you have to visit property page of all collections.

  I have a ConfigMgr 2012 Development environment, with considerable amount of clients and collections. One fine day i was testing Nomad deployment in some of my member servers. As it is a Development environment a single member server can be a member of multiple ConfigMgr collections. One of the member from patching team configured  maintenance window of 5 mins on a test collection and the member server is a member of that collection too..

  So when i deployed Nomad Branch agent deployment failed with a message "Service windows too short". Remember as i said before to check the maintenance window in all collection i had to visit the property page of all collection and there is not default report to show the maintenance window of all collections. So i thought i would build SQL query to list maintenance window of all collections.. here is the query,

SELECT v_Collection.Name, v_Collection.Comment,v_ServiceWindow.Description, v_ServiceWindow.StartTime, v_ServiceWindow.Duration
FROM v_ServiceWindow
JOIN v_Collection ON v_Collection.CollectionID = v_ServiceWindow.CollectionID
ORDER BY v_Collection.Name

 Create a report with this query and that report will list maintenance window configured in all collections.

Hope this helps..
S A Delphin

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons