I have started setting up groups like:
Where Department-supervisors is a member of Department-staff, and Department-director is a member of Department-supervisors.
I know how to use powershell to list what groups a person is a member of, either directly assigned, or inherited though the nested groups.
But what I'm trying to figure out is a script that will show me all the users who are members of one of those groups BOTH directly and indirectly, eg. User A is a direct member of Department-staff and Department-director.
My googling fails me in trying to find or write a script that can do that.
In reality, there are more layers and branches to the nesting, and many departments, so it gets confusing. I want to get a list of members who are part of any group directly, and also a member of the same group indirectly so I can remove the redundant group direct memberships.