Get all Workstations that have not rebooted since a Date (WQL)

Purpose: Get all Workstations that have not rebooted since 30, 60 or 90 days.

This is meant purely as monitoring collections. A workstation that has NOT rebooted in 90 days is prone to have problems, is slow, has not updated, application installations might be queued and so forth. Setting up and fixing these workstations will give the customer a better working environment.

 

All Workstations that have not rebooted in 30 Days
Limiting collection: All Windows 7 (With Client)
Resource Class: System Resource
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System INNER JOIN SMS_G_System_OPERATING_SYSTEM ON SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId WHERE ( SMS_G_System_OPERATING_SYSTEM.Caption like “%windows 7%”) and (DateDiff(day, SMS_G_System_OPERATING_SYSTEM.LastBootUpTime, GetDate()) >30)

 

All Workstations that have not rebooted in 60 Days
Limiting collection: All Windows 7 (With Client)
Resource Class: System Resource
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System INNER JOIN SMS_G_System_OPERATING_SYSTEM ON SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId WHERE ( SMS_G_System_OPERATING_SYSTEM.Caption like “%windows 7%”) and (DateDiff(day, SMS_G_System_OPERATING_SYSTEM.LastBootUpTime, GetDate()) >60)

 

All Workstations that have not rebooted in 90 Days
Limiting collection: All Windows 7 (With Client)
Resource Class: System Resource
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System INNER JOIN SMS_G_System_OPERATING_SYSTEM ON SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId WHERE ( SMS_G_System_OPERATING_SYSTEM.Caption like “%windows 7%”) and (DateDiff(day, SMS_G_System_OPERATING_SYSTEM.LastBootUpTime, GetDate()) >90)

 

Leave a Reply

Your email address will not be published. Required fields are marked *


+ six = eleven

Post Navigation