Sorry what I meant was, if I need to find a user I can't unless I know the OU they are in. Is there a way of finding their OU so I can drill down and get to them that way.
Apologies for any confusion.
Main Topics
Browse All TopicsCould someone tell me the best way of finding out which OU a user or computer is in? We've got lots of OU's and finding where objects belong can be a bit of a pain.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I am not aware of any GUI based tools, but you can use always use dsquery command line to find the OU.
For users: dsquery user -name "Displayname"
For Computers: dsquery computer -name "Computername"
The best thing about using the command line is that you can also do wildcard searches.
Eg. dsquery user -name Jo* will display all account names beginning with Jo
Hope this helps.
just select the top level right click hit find and type the name shoudl find it for you in teh search box? then look at properties tab to lcate the ou they are in?
failing that you can use the script below
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connec
Set objCommand = CreateObject("ADODB.Comman
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnectio
FindUser = InputBox("Please Enter A UserName", "Find User OU")
If FindUser = "" Then
MsgBox("No UserName Was Added")
WScript.Quit
Else
strUser = FindUser
End If
objCommand.Properties("Pag
objCommand.Properties("Sea
objCommand.CommandText = _
"SELECT distinguishedName FROM 'LDAP://dc=yourdomain,dc=c
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
strDN = objRecordSet.Fields("disti
arrPath = Split(strDN, ",")
intLength = Len(arrPath(1))
intNameLength = intLength - 3
Wscript.Echo "User :" & strUser & Right(arrPath(1), intNameLength)
objRecordSet.MoveNext
Loop
from http://www.tek-tips.com/vi
If you're using AD Users and Computers you have a few options:
1. Add the "Published At" column to the search
a. In AD Users and Computers
b. Open up the "Find" option.
c. Select View then Choose Columns
d. Add the Published At column
Now the search result box will include a full path to the account.
2. Use the Object properties
a. In AD Users and Computers
b. Select View, and Advanced Features (ticks it)
c. Find the User and open the properties
d. Check the Object tab under the "Canonical name of object"
There are programmatic methods too if you're doing things outside of AD Users and Computers.
HTH
Chris
Business Accounts
Answer for Membership
by: slam69Posted on 2009-03-25 at 03:47:35ID: 23977796
if you enable
"advanced" view in ADUC, you can also see the OU of an object by looking at
the properties.