How to get all groups that a user is a member of?

后端 未结 30 1739
攒了一身酷
攒了一身酷 2020-12-04 05:56

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?

30条回答
  •  一向
    一向 (楼主)
    2020-12-04 06:32

    Use:

    Get-ADPrincipalGroupMembership username | select name | export-CSV username.csv
    

    This pipes output of the command into a CSV file.

提交回复
热议问题