How can I find all groups for a specific user (groups for which the user is assigned) using dsquery?
Asked
Active
Viewed 1.6k times
5
-
What does the below command does- dsget group <<"cn of group">>? – Jan 15 '15 at 10:02
1 Answers
7
dsquery user -samid [username] | dsget user -memberof -expand | dsget group -samid
Good Luck!

gWaldo
- 11,957
- 8
- 42
- 69
-
1-samid is apparently dark hidden knowledge. I've been looking for this for a long time. Thank you! – Flat Cat Apr 30 '18 at 17:32