If you want to create a Configuration Manager Collection with all inactive devices in it, you can use the following WQL query. You can also change the last “0” to “1” to create a collection of active devices.
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_CH_ClientSummary
on SMS_G_System_CH_ClientSummary.ResourceId = SMS_R_System.ResourceId
where SMS_G_System_CH_ClientSummary.ClientActiveStatus = 0
About The Author
Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure. He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems, Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.
Related
Discover more from TechyGeeksHome
Subscribe to get the latest posts sent to your email.