aparis99 Posted June 25, 2012 Report post Posted June 25, 2012 We have a Computers OU setup in AD, with sub-OU's by department, then again into Desktops and Laptops. This helps when pushing something to a department, but I've setup Windows Updates to hit at different times depending on building locations. (ex: Our IT dept is spread across 2 buildings). I want to setup a query to make a collection depending on which building they are in. Is it possible to use this AD location to make a dynamic query? Quote Share this post Link to post Share on other sites More sharing options...
aparis99 Posted June 25, 2012 Report post Posted June 25, 2012 In case anyone wants to know, I figured it out. Solution: You can configure the AD System Discovery agent to include the attribute for the Location and then use it in queries. Quote Share this post Link to post Share on other sites More sharing options...
Eswar Koneti Posted June 26, 2012 Report post Posted June 26, 2012 you can go with this post how to add custom attributes from AD to SCCM.. http://wmug.co.uk/wmug/b/dotraphael/archive/2010/10/10/sccm-2007-understanding-active-directory-attribute-discovery.aspx Quote Share this post Link to post Share on other sites More sharing options...
Coenie Posted June 29, 2012 Report post Posted June 29, 2012 Here's the query statement: 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 like "(My domain name and ou)" Note, add a % after the "My domain name and ou" to make the query pull all sub ou's aswell. Quote Share this post Link to post Share on other sites More sharing options...