Get all Inactive Agents since Date (WQL)

Purpose: Get all Workstations that have inactive agents for 30, 60 or 90 days.

This is meant purely as monitoring collections. A workstation that has an inactive agent for 90 days is prone to have problems, is slow, has not updated, application installations are not deploying and so forth. Setting up and fixing these workstations will give the customer a better working environment.

 

Get all Workstations that have inactive agents for 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_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_WORKSTATION_STATUS.LastHardwareScan < DateAdd(dd,-30,GetDate())

 

Get all Workstations that have inactive agents for 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_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_WORKSTATION_STATUS.LastHardwareScan < DateAdd(dd,-60,GetDate())

 

Get all Workstations that have inactive agents for 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_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_WORKSTATION_STATUS.LastHardwareScan < DateAdd(dd,-90,GetDate())

 

Leave a Reply

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


seven + seven =

Post Navigation