Why use this template?
Use this free PowerShell script when you need to compare recursive group membership. It is generated locally and can be reviewed before you run it yourself in your own PowerShell session.
The template uses ActiveDirectory and requires Directory read access. Output: CSV report. Level: Advanced. Action: Read-only. Risk: Low.
Review before running
The script is generated in your browser. Read it before you run it, and test it outside production first. “Read-only” describes the script itself; anything you add around it can still change data.
Generate the script
- Open the template in the PowerShell Builder.
- Enter the requested values and review the module, permissions, output and risk.
- Generate the script, read it carefully, and test it outside production before use.
The script is generated locally in your browser. Nothing needs to be uploaded to Opselith.
Generate Compare two AD groups →How to use this result
Use this report when you need the membership differences between two Active Directory groups instead of two separate full membership lists.
When this helps
- Compare an old and new access group during a migration or permission change.
- Check whether two groups contain the same recursive membership population.
- Export only the objects unique to Group A or Group B for owner review.
How to read the result
- The template resolves recursive group membership for both groups and compares members by distinguished name.
- The CSV contains only differences and marks each row as OnlyGroupA or OnlyGroupB; members present in both groups are not included.
Things to check
- Recursive membership can include nested objects. Review ObjectClass before assuming every difference is a user account.
- This comparison shows group membership differences, not whether the groups grant equivalent effective permissions to applications, files or other resources.
What to do next: Review the differences with the group owner, then export either group separately when you need the complete membership list rather than only the delta.
Related tasks
Official references