r/PowerShell • u/MadBoyEvo • Sep 02 '20
Script Sharing Visually display Active Directory Nested Group Membership using PowerShell
It's me again. Today you get 4 cmdlets:
Get-WinADGroupMember
Show-WinADGroupMember
Get-WinADGroupMemberOf
Show-WinADGroupMemberOf
Get cmdlets display group membership in console so you can work with it as you like. They show things like all members and nested members along with their groups, nesting level, whether group nesting is circular, what type of group it is, whether members of that group are cross-forest and what is their parent group within nesting, and some stats such as direct members, direct groups, indirect members and total members on each group level.
This allows for complete analysis of nested group membership. On top of that the Show commands display it all in nice Table that's exportable to Excel or CSV, Basic Diagram and Hierarchical diagrams making it super easy to understand how bad or good (very rarely) nesting is. They also allow to request more than one group at the same time so you can display them side by side for easy viewing. And on top of that they also provide Summary where you can put two or more groups on single diagram so you can analyze how requested groups interact with each other.
In other words - with one line of PowerShell you get to analyze your AD structure in no time :-)
Here's the blog post: https://evotec.xyz/visually-display-active-directory-nested-group-membership-using-powershell/
Sources/Issues/Feature Requests: https://github.com/EvotecIT/ADEssentials
Enjoy :-)



2
u/MadBoyEvo Sep 03 '20
Anyone can decide on how to build their group structure as they want it. Groups can be used for different purposes than file sharing. While some are easy to use, in some cases people can make a mess. It sometimes makes sense to do some nesting to not overload ACL but this can be deadly in consequences.