SMSUG.ca

...your virtual communITy
Welcome to SMSUG.ca Sign in | Join | Help
in Search

Garth Jones

Find all PC with HW and SW inventory dates greater than 180 days

This WQL query will show you all PCs with a HW and SW Scan date of greater than 180 days.

select 
    SMS_R_System.Name, 
    SMS_R_System.LastLogonUserDomain, 
    SMS_R_System.LastLogonUserName
from  
    SMS_R_System 
    inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceId = SMS_R_System.ResourceId 
    inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId 
    inner join SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceId = SMS_R_System.ResourceId 
    inner join SMS_G_System_LastSoftwareScan on SMS_G_System_LastSoftwareScan.ResourceId = SMS_R_System.ResourceId 
where 
    SMS_G_System_SYSTEM.SystemRole = "Workstation" 
    and SMS_G_System_COMPUTER_SYSTEM.Model != "%Virtual%" 
    and Datediff(DD,SMS_G_System_WORKSTATION_STATUS.LastHardwareScan, Getdate()) > 180 
    and Datediff(DD,SMS_G_System_LastSoftwareScan.LastScanDate, Getdate()) > 180
Published Aug 26 2013, 09:11 AM by Garth
Filed under: , , , , , ,

Comments

 

Find all PC with HW and SW inventory dates greater than 180 days | My CMS said:

Pingback from  Find all PC with HW and SW inventory dates greater than 180 days | My CMS

August 27, 2013 11:42 AM

This Blog

Syndication

News

Training

Powered by Community Server (Non-Commercial Edition), by Telligent Systems