Create a SCCM collection that excludes members of another collection
To create a SCCM collection that excludes members of another collection, use the below query. In my example the collection ID is P000004C. This is useful when combining with the ‘limit collection’ function.
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.ResourceId not in (select ResourceID from SMS_CM_RES_COLL_P000004C)
----------------------------------------------------------------------------
I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.
----------------------------------------------------------------------------