When it comes to creating users for Active Directory, especially in new implementations, you want to minimize the time needed to create the accounts. This is possible by creating the AD users with Powershell.
Table of Contents
- Requirements
- Full script for creating AD users
- Step 1: Prepare CSV
- Step 2: Change parameters
- Step 3: Run PowerShell script to create AD users
📖 Estimated read time: 2 minutes
🔄 Page last updated on: May 20, 2025Requirements
- Minimal knowledge of Powershell
- An Active Directory environment
Full script for creating AD users
Here is the full script including CSV that creates the ad users:
Step 1: Prepare CSV
Fill in the CSV file with all required information.
The script I am using and sharing at this page has the following headings:
firstname,lastname,username,passwordThis is a very simple and effective manner where the script will base additional information like the emailaddress and proxyaddress attributes on the username.
Step 2: Change parameters
The script has the domain justinverstijnen.nl everywhere in it. This has to be changed at the following lines to your own preference:
- UserPrincipalName
- Path (Distinguished Name of OU)
- EmailAddress
- OtherAttributes
Step 3: Run PowerShell script to create AD users
Download the script file and copy the script and csv file to the same folder on the destination server. After that run the script and it will create the users.
Note: If you want to bypass the Powershell Execution Policy in the most effective and secure way possible, use the following command:
Set-ExecutionPolicy RemoteSigned -Scope ProcessThis will allow all scripts to be runned in the Powershell window till it is closed. After closing the window, running scripts will be blocked again till running this command again.
After running this command you can navigate to the folder where the CSV file and PS1 file are located and run the script by using:
.\bulk_user.ps1End of the page 🎉
You have reached the end of the page. You can select a category, share this post on X, LinkedIn and Reddit or return to the blog posts collection page. Thank you for visiting this post.
- Azure Master Class (12)
- Azure Virtual Desktop (17)
- Flying (15)
- Intune (3)
- Microsoft 365 (12)
- Microsoft Azure (27)
- Microsoft Defender XDR (4)
- Microsoft Entra (9)
- Networking (5)
- Powershell (18)
- Uncategorized (1)
- Windows 365 (2)
- Windows Server (12)
If you think something is wrong with this post or you want to know more, you can send me a message to one of my social profiles at: https://justinverstijnen.nl/about/
The terms and conditions apply to this post.
Page visitors: No page-counter data available yet.