PowerShell\'s Get-ADGroupMember cmdlet returns members of a specific group. Is there a cmdlet or property to get all the groups that a particular user is a member of?
First, import the activedirectory module:
import-module activedirectory
Then issue this command:
Get-ADGroupMember -Identity $group | foreach-object { Write-Host $_.SamAccountName }
This will display the members of the specified group.