Using the "net user" command in Windows XP to list all group memberships for a specific Active Directory user

19

4

Is it possible to list all group memberships for a certain AD user?
I thought it was something like:

net user londondom\john

But this doesn't seem to work for AD users. The same command will work for local users though:

net user johnlocal

Any ideas?

Rubans

Posted 2011-03-21T14:06:14.880

Reputation: 345

Answers

27

Try the following. I think it only works on the currently logged-in domain:

net user john /domain

Hyppy

Posted 2011-03-21T14:06:14.880

Reputation: 3 636

Thanks, for some reason I was trying it with the domain group before the username and it didn't like it. – Rubans – 2011-03-21T15:51:08.783

4

Write all direct groups for the account

dsquery user -samid loginname | dsget user -memberof >> groups.txt

List all group for the login account, additionally show nested groups(recursive)

dsquery user -samid loginname | dsget user -memberof -expand 

user220154

Posted 2011-03-21T14:06:14.880

Reputation: 41

dsquery/dsget absent here (WinXP). Any specific packages needed? – ivan_pozdeev – 2016-12-04T01:02:10.697