/build/static/layout/Breadcrumb_cap_w.png

How to report the OU that users are in?

Is there a way to run a report or search that checks what OU users are in?

Even if I would need to run something like an inventory rule to gather the info first and report later. I'm not sure Kace can write the user properties in its database the same way it does for computers though.

Scenario:

We have 2 User based OU's. Win 7 users belong in one OU and Win XP users belong in another. I'd like to run a report that returns users who have Win 7, but are in the XP OU.

 


0 Comments   [ + ] Show comments

Answers (1)

Posted by: dugullett 10 years ago
Red Belt
0

This may be more of an indirect method, but it will work. I'm not sure if the user OU is actually  reported in the registry like the machine OU is. 

Open AD, right click your OU, and export the list as a csv. Open the csv and add a new column (I used B). In cell B1 enter ="'"&A1&"'," . After you've entered that click and drag the length of the doc until you get to the last of your users. You should now have a column that matches A, but instead has usernames with '<USERNAME>',.

Once you've created the new column copy and paste it into a SQL query. Make sure to remove the trailing , at the end of the last name. If it is left there it will error.

 

SELECT NAME, IP, USER,OS_NAME

FROM MACHINE M

WHERE USER IN ('USER1', 'USER2', 'USER3', 'USER4')

ORDER BY NAME

This will only work if the user was logged in at the time of check in. So it may not be 100% accurate.


Comments:
  • Thanks Dug. It does work to group the users from that OU.

    The drawback is if the user's OU changes, the report does not auto update. The method you provided does help, and I'll get some advantage with it, but I'm hoping to find a dynamic method to keep track.

    The project this ties into is the act of moving staff from one OU to another based on which computer they have. That action happens manually in AD. Hence the hope that Kace will do it automatically.

    Thanks!!

    -Steve - murbot 10 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ