PowerShell 的Get-ADGroupMembercmdlet 返回特定组的成员。是否有 cmdlet 或属性来获取特定用户所属的所有组?
Get-ADGroupMember
我纠正了我的错误:Get-Member应该是Get-ADGroupMember.
Get-Member
Get-ADPrincipalGroupMembership 将执行此操作。
Get-ADPrincipalGroupMembership username | select name name ---- Domain Users Domain Computers Workstation Admins Company Users Company Developers AutomatedProcessingTeam