SQL Queries for SCCM

Computers that have 30 days or less hardware information SELECT a.ResourceID, a.Netbios_name0 AS[Name], b.LastHWScan FROM v_R_System a INNER JOIN v_GS_WORKSTATION_STATUS b ON a.ResourceID = b.ResourceID WHERE b.LastHWScan >= Dateadd(day, -30, getdate()) Collection of clients not approved SELECT a.ResourceID, a.Netbios_name0 AS[Name], a.ResourceType, a.SMS_Unique_Identifier0 AS[UniqueID], a.Resource_Domain_OR_Workgr0 AS[Domain], a.Client0, b.IsApproved FROM v_R_System a INNER JOIN v_CM_RES_COLL_SMS00001 b ON … Continue reading SQL Queries for SCCM