We can change the 30 days at end of the statement to adjust desired days. This query is targeted only for workstations such as XP, Vista
and Windows 7.
**********************************************************************
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 "%xp%" or
SMS_G_System_OPERATING_SYSTEM.Caption like "%vista%" or
SMS_G_System_OPERATING_SYSTEM.Caption like "%windows 7%") and (DateDiff(day,
SMS_G_System_OPERATING_SYSTEM.LastBootUpTime, GetDate()) >30)
**********************************************************************
**********************************************************************
More SCCM collection queries can be found here
Lovely
ReplyDeletethank you!!
ReplyDelete