Skip to content

Collection query - trying to make collection based on PC Location

Featured Replies

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

  • Author

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.

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.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.