Finding Group Membership from Active Directory with Dsquery

Use the following:

dsquery user -samid "username" | dsget user -memberof -expand

The -expand option will include nestled groups.

Written on March 27, 2009