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 ...
15th October 2008, 04:43 PM #1
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...
15th October 2008, 06:03 PM #2
FN_GM has a script that will locate it for you. You can't do it natively.
15th October 2008, 06:08 PM #3
The easer way is just to click on the Object Tab.
15th October 2008, 06:15 PM #4
15th October 2008, 07:27 PM #5
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 09:51 PM.
16th October 2008, 11:03 AM #6
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 11:16 AM.
16th October 2008, 11:12 AM #7
I should add that the Object tab is only visible if you have enabled Advanced Features in the console.
16th October 2008, 12:24 PM #8
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.
Originally Posted by BJG
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
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 12:25 PM.
Reason: Read to the end of thread and discovered I was duplicating.
Last Post: 22nd April 2012, 10:40 PM
By Neville in forum Windows
Last Post: 25th June 2008, 04:24 PM
Last Post: 31st January 2008, 01:17 PM
By mmoseley in forum Hardware
Last Post: 6th September 2007, 02:28 PM
By KarlGoddard in forum Web Development
Last Post: 22nd February 2006, 01:15 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)