sccm collection query
Posted on 2011-10-20
I am working on creating a new collection in SCCM that should include all computers, except for members of a specific AD group.
I have tried the following query, but it does not seem to work as intended. Query on "is equal" to a specific group works fine, but when I try to use not equal or != the query ends up showing all computers even if I include "where SMS_R_System.SystemGroupName = "mydomain\\Domain Computers"" or not.
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 SMS_R_System.SystemGroupName = "mydomain\\Domain Computers" and SMS_R_System.SystemGroupName != "mydomain\\specialservers"