Home > Active Directory > Group Membership – Nested Groups

Group Membership – Nested Groups

April 22nd, 2010

In addition to the article Ben wrote on April 7th, 2010, I would like to add that there is another “Group Membership” property available to a user-object when you are using the Quest AD Tools:

NestedMemberOf

This property lists all the indirect group memberships. If you want to retrieve all the groups the user is part of (directly and indirectly) this code will help you achieve that:

$sUser = get-qaduser -samaccountname <username>

$UsrGrps = $sUser.MemberOf

$UsrGrps += $sUser.NestedMemberOf

$UsrGrps

Categories: Active Directory Tags:
Comments are closed.