How to automate creating AD users with PowerShell and Excel

Generally I create new users by copying a Template user I created in AD and adding it to the correct OU, but I want to know how to automate new users with excel or basic PowerShell script that will copy the Template User from AD

How can this be done

There are literally thousands of examples for such a task out there in the internet. Some good points to start searching are:


Here is an article for you to start with.

new-aduser is the powershell command to build a new user.

you can use a csv file for input, so you should also read up on import-csv

or just a simple google search…

as always, don’t run someone else’s code if you don’t understand what its doing

Here’s a very basic example:




import-csv users.csv | new-aduser -whatif

What if: Performing the operation "New" on target "CN=js,OU=People,DC=powershell,DC=org".
What if: Performing the operation "New" on target "CN=js2,OU=People,DC=powershell,DC=org".