Home > Active Directory > Enumerate user memberships with Powershell

Enumerate user memberships with Powershell

April 7th, 2010

Enumerating user memberships is a common task to perform.  Unlike other scripting languages, with Powershell it’s a one-line action.

First download/install Quest AD Tools, and add them:

add-pssnapin quest.activeroles.admanagement

I use a semicolon to combine two Powershell commands:

$sUser = get-qaduser -samaccountname <username>; $sUser.MemberOf

Comments are closed.