I have three collections SCCM 2012:
- Global Domain – Test (I have two machines here already)
- Global Domain – 1 (i have 10 machines here already)
- Global Domain – 2 (Query should automatically add machine here)
I need your help in creating a query, for the collection "Global Domain – 2".
What the query has to do is,
- Find all the machines with the naming convention "SVDS"
- Ensure the machine that are already present in the collection "Global Domain – Test" and "Global Domain – 1" are skipped
- Add the rest to "Global Domain – 2"
Can you help with the query please ?
My query:
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.SystemOUName = "somthing.com/DOMAIN"
Question is How to exclude the machines which are already member of "Global Domain – Test" and "Global Domain – 1"
Best Answer
Use the Exclude Collections rule (now part of SCCM 2012) and exclude collections "Global Domain - Test" and "Global Domain - 1" from your "Global Domain - 2" device collection.
Adding the 2 exclude rules will exclude any child members, even if they are targeted by the "Global Domain - 2" query.
http://blogs.technet.com/b/configmgrdogs/archive/2012/04/24/include-exclude-collections-rule.aspx