SCCM Custom Report: List Workstations That Haven’t Rebooted in X Days.
This custom report can be useful for identifying workstations that have not rebooted recently. I use this report to identify users that may not have received the latest Group Policy settings or other items that require a reboot to be enforced. As well a report query, you must also add a prompt (no code necessary) named ‘Days‘. This is the variable that will store the amount of days you wish to search back. Set the default to 7 and do not allow nulls.
SELECT CS.Name0 AS [Hostname], CS.UserName0 AS [Last User], DateDiff(Day, OS.LastBootUpTime0, GetDate()) AS [Uptime (in Days)], OS.LastBootUpTime0 AS [Last Reboot Date], WS.LastHWScan AS [Last Hardware Inventory] FROM DBO.v_GS_WORKSTATION_STATUS WS LEFT OUTER JOIN DBO.v_GS_Operating_System OS ON WS.ResourceID = OS.ResourceID LEFT OUTER JOIN DBO.v_GS_COMPUTER_SYSTEM CS ON CS.ResourceID = OS.ResourceID LEFT OUTER JOIN DBO.v_GS_SYSTEM SYS ON SYS.ResourceID = OS.ResourceID LEFT OUTER JOIN DBO.v_R_SYSTEM RSYS ON RSYS.ResourceID = CS.ResourceID WHERE SYS.SystemRole0 = 'Workstation' AND DateDiff(Day, OS.LastBootUpTime0, GetDate()) > @Days ORDER BY CS.Name0Tags: ConfigMgr, microsoft, report, sccm Posted in ConfigMgr
No responses » | June 28th, 2010 by Tom |
SCCM Custom Report: All Servers Rebooted in the Last 7 Days.
This custom report for SCCM 2007 allows an administrator to determine which servers have been rebooted in the last 7 days. If you wish to change the 7 day interval, all you need to do is change the number 168 to the number of days, specified in hours.
SELECT CS.Name0 AS [Hostname], RSYS.Description0 AS [Directory Description], DateDiff(Hour, OS.LastBootUpTime0, WS.LastHWScan) AS [Uptime (in Hours)], OS.LastBootUpTime0 AS [Last Reboot Date], WS.LastHWScan AS [Last Hardware Inventory] FROM DBO.v_GS_WORKSTATION_STATUS WS LEFT OUTER JOIN DBO.v_GS_Operating_System OS ON WS.ResourceID = OS.ResourceID LEFT OUTER JOIN DBO.v_GS_COMPUTER_SYSTEM CS ON CS.ResourceID = OS.ResourceID LEFT OUTER JOIN DBO.v_GS_SYSTEM SYS ON SYS.ResourceID = OS.ResourceID LEFT OUTER JOIN DBO.v_R_SYSTEM RSYS ON RSYS.ResourceID = CS.ResourceID WHERE SYS.SystemRole0 = 'Server' AND DateDiff(Hour, OS.LastBootUpTime0, GetDate()) < 168 ORDER BY CS.Name0Tags: ConfigMgr, microsoft, report, sccm Posted in ConfigMgr
No responses » | June 16th, 2010 by Tom |

