Bulk Add Users to Active Directory & Quickly Create AD Accounts
It is not easy to bulk add users to the Active Directory. This is because the traditional methods that admins use like the ADUC and the Admin Center, lack any such option. Not to mention, adding users one by one is too slow in the modern work environment which prioritizes agility. Moreover, even the users lose a lot of productive time if their account is not set up on time. Before the bulk addition methods, let’s go through the known methods to see why they are so slow.
Table of Contents
How to Create a User in an Active Directory Step-by-Step using the Admin Center
- Type Active Directory Admin Center in the Windows Search bar and Open the first result.
- Click on the Users option present below the domain name.
- Go to the Tasks pane and click New
- Select the User option from the popup menu.
- In the New window that opens fill in all the details and open click OK.
- The New User should appear in the Viewing section of ADAC
Use ADUC and Add Users to Active Directory
- Search for Active Directory Users and Computer snap-in.
- There are three ways to start user creation in ADUC
- The first option is to Click on the Action Tab > New > User.
- Otherwise, Right Click anywhere on the dashboard > New > User.
- The fastest way is to hit the New User icon on the taskbar.
- Fill in User Details > Next.
- Setup Password > Next.
- Check > Finish.
Create Multiple Users in Active Directory using Command Line
Press Window + R Key together > Type cmd in the Run Module > Press Enter.
Type:
dsadd user "CN=DummyUser1,CN=Users,DC=cu14mail,DC=local" -samid jdoe -pwd P@ssw0rd
Press Enter
You should see a dsadd succeeded message.
Change the user name and the rest of the details and reuse the same command for the rest of the files.
Despite having the repeatability factor none of the above methods are designed to bulk add users to Active Directory. Although it might be possible to create a batch script and put the dsadd command in it is too complicated. The only practical option for admins if they chose any of the previous methods is to repeat the process till all user’s accounts are deployed in the AD. Plan carefully otherwise you may need to disable multiple users in Active Directory again.
One way to skip this manual mayhem is to utilize the PowerShell scripts. So let’s see how.
PowerShell Script to Create Multiple Users in AD
We recommend that you run the following script in an ISE module. Moreover, before using this script ensure that you possess a CSV file in the correct format. The compulsory parameters like the username and password should be present.
After the prerequisites are complete copy and paste the following script.
# Import Active Directory module Import-Module ActiveDirectory # Function to create a user with error handling function Create-ADUserInBulk ($userName, $firstName, $lastName, $userPassword, $targetPath) { # Secure password generation (replace with your preferred method) $securePassword = ConvertTo-SecureString $userPassword -AsPlainText -Force New-ADUser -Path $targetPath -Name $userName -GivenName $firstName -Surname $lastName -AccountPassword $securePassword -Enabled $true Write-Host "User $($userName) created successfully!" } # Read user data from a CSV file $users = Import-CSV "C:\Users\Administrator\Desktop\new-users.csv" foreach ($user in $users) { Create-ADUserInBulk $user.UserName $user.FirstName $user.LastName $user.Password $user.Path }
Write-Host “Script execution completed.”
Save it and hit the green run icon.
The script populates the AD by placing the Users in their correct Organizational Unit.
User Addition Best Practices
- Check and report on the user creation process with the help of a professional utility like SysTools Active Directory Reporting Software. The tool can give you a user list so admins can reset the user password in Active Directory if they want.
- Filter out the old user accounts with the duration setting mechanism and get the list of recently added users.
- Prepare an automated CSV report and share it with the relevant stakeholders. Also, make sure that the source CSV file containing user data is proper.
- Use the tool before running the PowerShell script to avoid reusing the same user name which already exists inside the Active Directory.
Conclusion
We now hope admins can bulk add users to Active Directory without much effort. In the course to reveal the PowerShell method, we went through all the basic alternatives of single-user addition. In the end, we told you about the best practices, which include the use of a tool for reporting user additions.