5

How can I find all groups for a specific user (groups for which the user is assigned) using dsquery?

  • What does the below command does- dsget group <<"cn of group">>? – user265098 Jan 15 '15 at 10:02
7
dsquery user -samid [username] | dsget user -memberof -expand | dsget group -samid

Good Luck!

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.