Matze1983 Posted August 11, 2014 Report post Posted August 11, 2014 hello all, i´m new here and i´m new relativity new to SCCM. We have a huge active directory with many OU´s. At the moment, i try to create some device collection for windows updates based on OU. We have several locations with server-ou´s: Land\City\Server\ImportantServer Land\City\Server\MemberServer for about 100 locations. now i plan to deploy windows-updates distinguished by ImportantServer and MemberServer. I know, that I can make device collections based on OU in Membership Rules, but in the Query Statement, I have to give the complete path to the OU: 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 = "PATH OF THE OU" Now my question: is it possible to query all OU´s named "ImportantServer" and "MemberServer" in the complete active directory independent from the Land, City etc? I hope my question is understandable Thanks everybody for your help! Best regards Mathias Quote Share this post Link to post Share on other sites More sharing options...
Peter33 Posted August 11, 2014 Report post Posted August 11, 2014 Try this one. 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.DistinguishedName like "%ImportantServer%" Do not use SystemOUName. It's not distinct because it keeps a history. Quote Share this post Link to post Share on other sites More sharing options...
Matze1983 Posted August 11, 2014 Report post Posted August 11, 2014 Thank you very much, guys! It works Quote Share this post Link to post Share on other sites More sharing options...