PowerShell: Creating Active Directory Users with Excel/CV input

Simply create multiple users with PowerShell for Active Directory.

In this guide I am going to walk you through a script that i have created and modified for industry liking.

What you will need from me:

1. This (import_create_ad_users_Sent) is a spreadsheet you sent to your HR. I have locked the headers so they can’t change anything. I have also added some auto-fill commands to help them out.

2. Once you have received the import_create_ad_users_Sent back from HR you will want to create it into a CV. File save as “import_create_ad_users“.

3. This (Create_AD_Users.ps1) is the PowerShell Script to add users to Active Directory. WordPress doesn’t allow me to give you the code in ps1 or text format. You will have to change it from word(.docx) to PowerShell(.ps1).

4. Now it is time to transfer the documents over to the AD server. I usually add my AD scripts to a folder on the C drive called ADScripts.

5. Run the PowerShell Script. Now you have added all of your users.

Take a break.

To make sure the CSV looks correct inside of PowerShell you can run this command

Import-csv ".\import_create_ad_users.csv" | Out-GridView

Notes and Updates on this script:

# Version 1: 1-12-2014
# – Added Error Handling and Reporting.
# – Input File is simple
# – Account Enabled = True or False (default = True)
# – ChangePasswordAtNextLogon = True or False (default = True)
# – HomeDirectory and HomeDrive also added ProfilePath, ScriptPath,
# – Add the option to move users to a different OU
# Working on
# – Adding the function for ProxyAddresses
# – Extra blank data at the end of the CV.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s