Enumerating Groups
PowerView
Get all groups in current domain
Get-NetGroupGet all groups in another domain
Get-NetGroup -Domain <DOMAIN NAME>Get all groups with full properties in current domain
Get-NetGroup -FullDataGet all groups with full properties in another domain
Get-NetGroup -Domain <DOMAIN NAME> -FullDataGet all properties of a specific group in current domain
Get-NetGroup -GroupName <GROUP NAME> -FullDataGet all properties of a specific group in another domain
Get-NetGroup -GroupName <GROUP NAME> -Domain <DOMAIN NAME> -FullDataGet all groups containing the word "admin" in group name on current domain
Get-NetGroup *admin*Get all groups containing the word "admin" in group name on another domain
Get-NetGroup *admin* -Domain <DOMAIN NAME>Get group membership of a specific user
Get-NetGroup -Username <USER NAME>Get group membership of a specific user from another domain
Get-NetGroup -Username <USER NAME> -Domain <DOMAIN NAME>Get all members of a specific group
Get-NetGroupMember -GroupName <GROUP NAME> -RecurseGet all members of a specific group from another domain
Get-NetGroupMember -GroupName <GROUP NAME> -Domain <DOMAIN NAME> -RecurseNOTE
To enumerate the members of local group, LOCAL ADMINISTRATOR privilege is required
Get all local groups on current machine, which have membership of administrator groups on DC
Get-NetLocalGroup -ListGroupsGet all local groups on another machine
Get-NetLocalGroup -ListGroups -ComputerName <COMPUTER NAME>Get details about members of all local groups on current machine
Get-NetLocalGroup -RecurseGet details about members of all local groups on another machine
Get-NetLocalGroup -Recurse -ComputerName <COMPUTER NAME>Active Directory Module
Get all groups in current domain
Get-ADGroup -Filter * | Select NameGet all groups in another domain
Get-ADGroup -Filter * -Server <DOMAIN NAME> | Select NameGet all groups in current domain with all properties
Get-ADGroup -Filter * -Properties *Get all groups in another domain with all properties
Get-ADGroup -Filter * -Properties * -Server <DOMAIN NAME>Get all groups containing the word "admin" in group name on current domain
Get-ADGroup -Filter 'Name -like "*admin*"' | Select NameGet all groups containing the word "admin" in group name on another domain
Get-ADGroup -Filter 'Name -like "*admin*"' -Server <DOMAIN NAME> | Select NameGet group membership of a specific user from current domain
Get-ADPrincipalGroupMembership -Identity <USERNAME>Get group membership of a specific user from another domain
Get-ADPrincipalGroupMembership -Identity <USERNAME> -Server <DOMAIN NAME>Get all members of a specific group
Get-ADGroupMember -Identity <GROUP NAME> -RecursiveGet all members of a specific group
Get-ADGroupMember -Identity <GROUP NAME> -Server <DOMAIN NAME> -Recursive Last updated