Jump to content


aparis99

Collection query - trying to make collection based on PC Location

Recommended Posts

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?

 

post-9917-0-38204000-1340632885_thumb.jpg

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.