Quick way to find users OU?

L

LWG

Does anyone have a quick way to deteremine what OU a user is part of? I
usually use AD users and computers - find command, then name mapping. What
is required for the name mapping option to be available? I am trying to find
something for our helpdesk to use to make this quick...

thx in advance...
 
J

Jerold Schulman

Does anyone have a quick way to deteremine what OU a user is part of? I
usually use AD users and computers - find command, then name mapping. What
is required for the name mapping option to be available? I am trying to find
something for our helpdesk to use to make this quick...

thx in advance...
yes.

dsquery * domainroot -filter
"(&(objectCategory=Person)(objectClass=User)(sAMAccountName=%usr%))" -attr
sAMAccountName distinguishedName

where %usr% can be replaced by the users logon name (sAMAccountName)

The above is one line.

See tip 7330 in the 'Tips & Tricks' at http://www.jsiinc.com

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top