Tip: You can list the nested groups of a user in Active Directory:
As an example, there are 3 groups : Group 1, Group 2 and Group 3.
Non-Nested Groups
1 |
(Get-ADUser -Identity jsmith -Properties MemberOf).MemberOf |
Nested Groups
1 2 |
$DN = (Get-ADUser -Identity jsmith -Properties DistinguishedName).DistinguishedName Get-ADGroup -LDAPFilter "(member:1.2.840.113556.1.4.1941:=$($DN))" |
Note: Get-ADUSer requires ActiveDirectory module.