SCCM WQL Queries (WMI)
Some of the useful queries that I wrote for various customers in last few years and thought to put this all in a public post.
Device Collection Dynamic Query Rule
To get members of an AD group and make them member of collection.
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 where SystemGroupName like "%\"
- Replace the
with the actual name of your AD group