Monday, November 3, 2014

Using PowerShell Get-ADPrincipalGroupMembership to find a user's groups

I needed to find a good AD group to grant organization wide permissions to an SSRS report and found the Get-ADPrincipalGroupMembership was really useful for querying AD.  The server needs to have the "Active Directory modul for Window PowerShell" feature enabled to allow import-module activedirectory to work:

import-module activedirectory
Get-ADPrincipalGroupMembership [username without domain prefeix] | Get-ADGroup -Properties * | select name, description
Get-ADGroup [group name]

No comments: