Why use this template?
Use this free PowerShell script when you need to export direct members of an ad group. 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: Beginner. 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 Export direct AD group members →How to use this result
Use this template when you need the immediate members of one Active Directory group without expanding membership through nested groups.
When this helps
- Check exactly which objects are directly assigned to a group.
- Compare direct membership with the recursive user-focused export when nested groups are involved.
- Create a simple CSV for group ownership or membership troubleshooting.
How to read the result
- The report reflects direct membership only. A user who is present only through a nested group is not a direct member of the parent group.
- Use the recursive Export AD group members template when your task is to resolve nested user membership.
Things to check
- Direct membership and effective access are not the same thing when nested groups or other authorization layers are involved.
- Review the object type in the result before assuming every member is a user account.
What to do next: If the group contains nested groups and you need the resulting user population, switch to Export AD group members. Otherwise review the direct CSV with the group owner before making changes.
Related tasks
Official references