SCUG.dk
System Center User Group Denmark
Config. Mgr Report – List all Maintenance windows

Configuration Manager ships with a built-in report showing maintenance windows for a single computer. I have just done a few modifications to that report (added a few columns and removed the prompt).

SELECT     TOP (100) PERCENT sw.Name AS [MW Name], sw.Description, sw.StartTime, sw.Duration AS 'Duration Minutes', sw.IsEnabled AS 'MW Enabled',
                      dbo.v_R_System.Name0, 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
WHERE     (dbo.v_R_System.Operating_System_Name_and0 LIKE '%server%')
ORDER BY [MW Name], dbo.v_R_System.Name0

image

This post was originally posted to http://agerlund.spaces.live.com/blog/cns!3A51A2B50B5C1F51!646.entry May 19-2009


Posted 07-09-2009 21:11 by Kent Agerlund
Filed under: ,

Comments

CJRicard wrote re: Config. Mgr Report – List all Maintenance windows
on 11-04-2009 21:45

Thanks for the report.  It's very helpful - I did tweak it a bit.  

There are two mofs below - one with computer detail, one without.

Curt

// *********************************************************************************

//

// Created by SMS Export object wizard

//

// Wednesday, November 04, 2009 created

//

// File Name: sccm_maint_window_computerdetail.MOF

//

// Comments :

//

// contains list of all maint windows, with computer detail

//

// *********************************************************************************

// ***** Class : SMS_Report *****

[SecurityVerbs(140551)]

instance of SMS_Report

{

Category = "DES Recommended";

Comment = "Returns list of all maintenance windows and collections associated with them.";

GraphCaption = "";

GraphXCol = 1;

GraphYCol = 2;

MachineDetail = FALSE;

MachineSource = FALSE;

Name = "All Maintenance Windows without Computer Detail";

NumPrompts = 0;

RefreshInterval = 0;

ReportGUID = "{FF4BF53B-771F-4F48-ACDD-918E3CE24398}";

SecurityKey = "";

SQLQuery = "SELECT     TOP (100) PERCENT sw.Name AS [MW Name], vcoll.Name AS 'Collection Name', sw.Description AS 'MW Description', sw.IsEnabled AS 'MW Enabled', sw.StartTime AS 'MW Start Time', sw.Duration AS 'MW Duration in Minutes',  sw.collectionID AS 'Collection ID'

\n                      

\nFROM         dbo.v_ServiceWindow AS sw INNER JOIN

\n                      dbo.v_FullCollectionMembership AS fcm ON sw.CollectionID = fcm.CollectionID INNER JOIN v_Collection as vcoll on sw.CollectionID = vcoll.CollectionID

\n

\nORDER BY [MW Name]";

StatusMessageDetailSource = FALSE;

UnicodeData = FALSE;

XColLabel = "";

YColLabel = "";

};

// ***** End *****

// *********************************************************************************

//

// Created by SMS Export object wizard

//

// Wednesday, November 04, 2009 created

//

// File Name: sccm_maint_window_withcomputerdetail.MOF

//

// Comments :

//

//

// *********************************************************************************

// ***** Class : SMS_Report *****

[SecurityVerbs(140551)]

instance of SMS_Report

{

Category = "DES Recommended";

Comment = "Returns list of all maintenance windows and collections associated with them; includes OS/Computer name of collection members.";

GraphCaption = "";

GraphXCol = 1;

GraphYCol = 2;

MachineDetail = FALSE;

MachineSource = FALSE;

Name = "All Maintenance Windows with Computer Detail";

NumPrompts = 0;

RefreshInterval = 0;

ReportGUID = "{230FA0BB-273D-449F-85B4-E8020AF0CEEC}";

SecurityKey = "";

SQLQuery = "SELECT     TOP (100) PERCENT sw.Name AS [MW Name], vcoll.Name AS 'Collection Name', sw.Description AS 'MW Description', sw.IsEnabled AS 'MW Enabled', sw.StartTime AS 'MW Start Time', sw.Duration AS 'MW Duration in Minutes',  sw.collectionID AS 'Collection ID',

\n                      dbo.v_R_System.Name0 AS 'Computer Name',   dbo.v_R_System.Operating_System_Name_and0

\nFROM         dbo.v_ServiceWindow AS sw INNER JOIN

\n                      dbo.v_FullCollectionMembership AS fcm ON sw.CollectionID = fcm.CollectionID INNER JOIN v_Collection as vcoll on sw.CollectionID = vcoll.CollectionID INNER JOIN dbo.v_R_System ON fcm.ResourceID = dbo.v_R_System.ResourceID

\nWHERE     (dbo.v_R_System.Operating_System_Name_and0 LIKE '%')

\nORDER BY [MW Name], dbo.v_R_System.Name0";

StatusMessageDetailSource = FALSE;

UnicodeData = FALSE;

XColLabel = "";

YColLabel = "";

};

// ***** End *****

Kent Agerlund wrote re: Config. Mgr Report – List all Maintenance windows
on 11-04-2009 21:49

that's cool :-)

Copyright SCUG.dk
Powered by Community Server (Commercial Edition), by Telligent Systems