Quick way to find users OU?

  • Thread starter Thread starter LWG
  • Start date Start date
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...
 
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
 
Back
Top