SQL Query : Systems With Hardware Scan > 60 Days ago

You can identify devices which have not checked in for some time, or those with potentially faulty SCCM clients using this query.

 SELECT
   a.ResourceID,
   a.Netbios_name0,
   b.LastHWScan
 FROM v_R_System a
   INNER JOIN v_GS_WORKSTATION_STATUS b ON a.ResourceID = b.ResourceID
 WHERE b.LastHWScan <= Dateadd(day, -60, getdate())
 order by LastHWScan desc

Sample Output

 

 

Related posts

Leave a Comment