Monday, 9 July 2012

PowerShell - Get AD user group memberships

Here is just a quick post on how to retrieve the AD group membership list for an AD user. The following commands need to be run on a Windows 7 or Server 2008 and above operating systems where the RSAT tools are installed.

  1. Import-module ActiveDirectory
  2. (GET-ADUSER –Identity ben.morris –Properties MemberOf | Select-Object MemberOf).MemberOf
Tip: Pipe to Out-GridView for easier reading.