Skip to content

Recurse Query - AD OUs

Featured Replies

I am setting up collections of devices to mimic the OUs setup in AD. Mostly this is for Computer objects. I had found that i can query for Devices in an OU, but I was wondering is there a way to Query a root OU, and have all sub OUs machines included.

 

In the mean time my query has been using the Criterion type as "A List of Values" and I have been adding the root OU, and all sub OUs manually (this is becoming very time consuming). I am worried that down the road when an OU is added, nobody will remember to add the new OU to the machine collection.

 

Any more information needed please let me know.

  • Author

I was thinking that maybe putting the "is Like" operator along with the OU name might help, but this wont work from some of my OU Heirarchy. If I do get the change to test, will post results.

Actually this is really simple due to the way System OU discovery works. Tehre is no need to use the "is like" Just write the query for the Top level OU and all sub OU PC will automatically be included.

 

Your Query will look very similar to this

select * from SMS_R_System where SMS_R_System.SystemOUName = "GARTEK.TST/SERVER"

  • Author

Thanks! I will have to test this going forward.

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.