Always test scripts against a dedicated test organizational unit (OU) before running them in production. A mistake in AD can have broad impact across your environment.
What’s covered
The AD scripts are organized into the following categories:- User management — Query, create, modify, enable, disable, and report on user accounts
- Group management — Manage group membership, analyze nested groups, and audit group usage
- Domain administration — Domain-wide reporting, OU structure queries, and policy-related automation
Prerequisites
Required module
All Active Directory scripts require theActiveDirectory PowerShell module. Install it with:
Required permissions
| Operation | Minimum permission |
|---|---|
| Querying users, groups, OUs | Domain Users (read access) |
| Modifying accounts or group membership | Account Operators or delegated rights |
| Domain-wide changes, creating OUs | Domain Admins |
Script categories
User Management
Query user accounts, generate reports, create and modify accounts, and manage account status (enable/disable).
Group Management
Query group membership, add and remove members, analyze nested groups, and audit group usage.
Getting started
Review the script before running
Open the script in a text editor and read the parameters and comment block at the top before executing.
