Super_Noob Posted January 11, 2016 Report post Posted January 11, 2016 Hi all, I'm stumped by a collection I need to make. I jumped into an SCCM role and unfortunately I do not control the AD structure. I need to create a collection of all of the companies workstations under an AD OU Workstations. The caveat is that under that OU is a sub OU for production machines that I do not want in this collection. I have a query created collection and am pulling all of the Workstations OU and I also have a collection of the sub OU. Can anyone advise me on the syntax to create a new collection with the proper exclusion? Here is an example of what I am trying but haven't gotten correct yet: 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 = "DOMAIN.NET/WORKSTATIONS/WORKSTATIONS (SP2 REQUIRED)" not in "DOMAIN.NET/WORKSTATIONS/WORKSTATIONS (SP2 REQUIRED)/PRODUCTIONS" I appreciate any guidance! Thanks, Rob Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted January 11, 2016 Report post Posted January 11, 2016 Use a Subselect or Collection exclusion. http://www.enhansoft.com/?s=subselect Quote Share this post Link to post Share on other sites More sharing options...
Super_Noob Posted January 12, 2016 Report post Posted January 12, 2016 Thanks GarthMJ. I'll check it out. Quote Share this post Link to post Share on other sites More sharing options...
Super_Noob Posted January 12, 2016 Report post Posted January 12, 2016 That worked GarthMJ, thanks! Quote Share this post Link to post Share on other sites More sharing options...