+ Post New Thread
Results 1 to 8 of 8
Windows Thread, Query on Active Directory searches in Technical; I'm sure this is a dumb question, but it's puzzling me... If you do a search for a user in ...
  1. #1
    BJG
    BJG is offline
    BJG's Avatar
    Join Date
    May 2008
    Location
    Norwich
    Posts
    466
    Thank Post
    89
    Thanked 35 Times in 25 Posts
    Rep Power
    23

    Query on Active Directory searches

    I'm sure this is a dumb question, but it's puzzling me...

    If you do a search for a user in Active Directory, and it finds the record, how can you tell whereabouts in the structure that entry is...? The only available fields for the search results seem to be things within the properties for the user, and not things about the container it's in...

  2. #2

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    FN_GM has a script that will locate it for you. You can't do it natively.

  3. #3
    RobFuller's Avatar
    Join Date
    Feb 2007
    Location
    Chelmsford
    Posts
    314
    Thank Post
    83
    Thanked 39 Times in 29 Posts
    Rep Power
    22
    The easer way is just to click on the Object Tab.

  4. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,228
    Thank Post
    894
    Thanked 1,777 Times in 1,533 Posts
    Blog Entries
    12
    Rep Power
    462
    Quote Originally Posted by powdarrmonkey View Post
    FN_GM has a script that will locate it for you. You can't do it natively.
    here you go...

    Find the location of a computer account in Active Directory

    Find the location of a user account in Active Directory

    Quote Originally Posted by RobFuller View Post
    The easer way is just to click on the Object Tab.
    Object tab?

  5. #5

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,178
    Thank Post
    74
    Thanked 307 Times in 243 Posts
    Rep Power
    115
    This probably sounds harder than it is, but you can add an item to the right-click context menu for computer and user objects in ADUC which calls a 2-3 line script to pop-up a message box with the objects location. This is easy because the script is passed the object's distinguishedName ("cn=blah,ou=bike shed,ou=..") as an argument .. all it has to do is display that.

    I've been doing more complex things around that, but I'm sure I've seen a little walk-through for just displaying the dn somewhere - will try and find it later.

    Later: Can't find it, but here's one for restarting computers which is close enough - just substitute a tiny script to display WScript.Arguments(0) and add the context menu item to user objects as well.

    Oddvar Håland Moe's blog
    Last edited by PiqueABoo; 15th October 2008 at 08:51 PM.

  6. #6
    BJG
    BJG is offline
    BJG's Avatar
    Join Date
    May 2008
    Location
    Norwich
    Posts
    466
    Thank Post
    89
    Thanked 35 Times in 25 Posts
    Rep Power
    23
    Thanks for all the suggestions. I hadn't spotted that you can get the info from the Object tab of the item's properties window...
    Last edited by BJG; 16th October 2008 at 10:16 AM.

  7. #7

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    I should add that the Object tab is only visible if you have enabled Advanced Features in the console.

  8. #8
    ArchersIT's Avatar
    Join Date
    Nov 2006
    Location
    Bedfordshire
    Posts
    114
    Thank Post
    14
    Thanked 24 Times in 20 Posts
    Rep Power
    21
    Quote Originally Posted by BJG View Post
    I'm sure this is a dumb question, but it's puzzling me...

    If you do a search for a user in Active Directory, and it finds the record, how can you tell whereabouts in the structure that entry is...? The only available fields for the search results seem to be things within the properties for the user, and not things about the container it's in...
    Firstly, you can do it all via the scripts that have been quoted, but you can also do it direct in the Users and computers plugin you are currently using.

    Firstly (before you find anything) make sure that the "Advanced Features" is ticked (it is in the view menu). This will create a few extra tabs on the properties box.

    One of these tabs is titled "Object". This contains the canonical name of the object, which is effectively the location.

    Obviously if you want the "Advanced Features" to stay ticked, then you have to enable the save changes mode in the MMC... but that is another story!

    I hope this helps

    Jonathan
    P.S. Sorry for duplicating what was said earlier - I could have sworn that they were not there when I looked!
    Last edited by ArchersIT; 16th October 2008 at 11:25 AM. Reason: Read to the end of thread and discovered I was duplicating.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 25
    Last Post: 21st October 2014, 09:48 AM
  2. Active Directory
    By Neville in forum Windows
    Replies: 6
    Last Post: 25th June 2008, 03:24 PM
  3. Replies: 7
    Last Post: 31st January 2008, 12:17 PM
  4. TeraStation and Active Directory
    By mmoseley in forum Hardware
    Replies: 4
    Last Post: 6th September 2007, 01:28 PM
  5. Query Active Directory through asp page
    By KarlGoddard in forum Web Development
    Replies: 19
    Last Post: 22nd February 2006, 12:15 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •