Sign in with
Sign up | Sign in
Your question

Find what OU a user is a member of

Tags:
  • Microsoft
  • Active Directory
  • Windows
Last response: in Windows 2000/NT
Share
Anonymous
September 12, 2005 10:14:02 PM

Archived from groups: microsoft.public.win2000.active_directory (More info?)

Can someone tell me the easiest way to find out what OU a user is a member of.

Thanks

More about : find user member

Anonymous
September 13, 2005 12:42:09 AM

Archived from groups: microsoft.public.win2000.active_directory (More info?)

The OU is part of the distinghuishedname of the user object. So, if you know
how to get the DN, you will get the OU. Alternatively, if you enable
"advanced" view in ADUC, you can also see the OU of an object by looking at
the properties.

--

Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCP+I
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
"Ziguana" <Ziguana@discussions.microsoft.com> wrote in message
news:43427342-4F88-40D6-B5AC-1C4D4B0BFED9@microsoft.com...
> Can someone tell me the easiest way to find out what OU a user is a member
> of.
>
> Thanks
Anonymous
September 13, 2005 12:36:18 PM

Archived from groups: microsoft.public.win2000.active_directory (More info?)

On Mon, 12 Sep 2005 18:14:02 -0700, "Ziguana" <Ziguana@discussions.microsoft.com> wrote:

>Can someone tell me the easiest way to find out what OU a user is a member of.
>
>Thanks


You can use dsquery to query the user name for the distinguished name.

dsquery * domainroot -filter "(&(objectCategory=Person)(objectClass=User)(sAMAccountName=Jerry))" -attr distinguishedName -limit 0

See tip 7714 » What attribute names can I use with the user filtered dsquery command?
in the 'Tips & Tricks' at http://www.jsifaq.com


You can use ADFind freeware to do the same:
adfind -default -dsq -f "&(objectcategory=person)(samaccountname=Jerry)"

See tip 5898 » Freeware ADFind

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
Related resources
February 26, 2008 9:26:42 AM

Did you read the question thouroughly? It says: "The EASIESTway" :sleep: 

I don't think neither of the repliers knew what the question was, and neither knew how to reply :pt1cable: 

So here's the solution:
1.) Goto Active Directory users and Computers
2.) Goto menu "View" and enable "Advanced Features"
3.) No find your user and check his/her properties. You'll see that there will be an additional tab called "Object", which shows the cannonical name. Hence the tree to the OU will be displayed.

How easy do you want it?

Regards,

R0bstar
Sys Engine
Homebrew Agricultivist
MCSE+ * square = very smart ass!

Creed: Always doubt! Never hesitate!
September 29, 2011 5:04:07 AM

R0bstar is there a way to get the info you mentioned above in batch for 150 servers
December 4, 2011 3:31:39 AM

R0bstar said:
Did you read the question thouroughly? It says: "The EASIESTway" :sleep: 

I don't think neither of the repliers knew what the question was, and neither knew how to reply :pt1cable: 

So here's the solution:
1.) Goto Active Directory users and Computers
2.) Goto menu "View" and enable "Advanced Features"
3.) No find your user and check his/her properties. You'll see that there will be an additional tab called "Object", which shows the cannonical name. Hence the tree to the OU will be displayed.

How easy do you want it?

Regards,

R0bstar
Sys Engine
Homebrew Agricultivist
MCSE+ * square = very smart ass!

Creed: Always doubt! Never hesitate!









Thanks Buddy.....It works Fine
!