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.
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.