Friday, September 5, 2014

How to add multiple users to a Windows 2008 R2 Active Directory domain

This is just a quick post, I needed to add about 50 users to an AD OU, and needed a way to do it quickly, and ran into many posts with conflicting scripts which didnt work.  Finally I created one myself that's simple enough.

You need 2 files, the PowerShell script, and the CSV file, which I will have links for at the bottom.

Put the two scripts in C:\Users\Administrator and open up PowerShell, and drag the script into it.


The script will load the AD Module ("Import-Module activedirectory" )

You just have to change the CSV file to match your settings.

Also, make  sure "Active Directory Web Services" service is started, open up services.msc from Start-->Run, and start the service if it doesnt start, otherwise you'll get an error like:

“Error initializing default drive: ‘Unable to find a default server with Active Directory Web Services running”