Using PowerShell - List the groups to which a user belongs
1. Prepare
- DC21 : Domain Controller (pns.vn)
- SYNTAX :
Get-ADPrincipalGroupMembership [-Identity] ADPrincipal [-AuthType Negotiate | Basic]
[-Credential pscredential] [-Partition string] [-ResourceContextPartition string]
[-ResourceContextServer string] [-Server string] [CommonParameters]
2. Step by step : List the groups to which a user belongs using PowerShell
- DC21 : List the groups to which HiepIT belongs using PowerShell
+ Start - Windows PowerShell, type :
+ Get-ADPrincipalGroupMembership HiepIT | Select Name
Ещё видео!