Bulk Users PDF
Bulk Users PDF
option=com_content&view=article&id=193:create-bulk-usersin-active-directory&catid=48:active-directory&Itemid=53
Create Bulk/Multiple Users in Active Directory Step by Step Guide
Before proceed with the user creation create the OU structure in Active Directory Users and
Computers snapin and Password Policy.
Create a CSV file that include Organization Users with specific attributes to be imported in the
Active Directory. See below example template of mine.
If you want to split User's name you can use below Excel formula.
Open Active Directory Module for Windows PowerShell from Administrative Tools.
Change the powershell path. Run below script. (change the CSV file name and domain name)
Import-Csv .\DOITFIXITUsers.csv | foreach-object { $userprinicpalname =
$_.SamAccountName + "@doitfixit.local"; New-ADUser -SamAccountName
$_.SamAccountName -UserPrincipalName $userprinicpalname -Name $_.name -DisplayName
$_.name -GivenName $_.cn -SurName $_.sn -Department $_.Department -Path $_.path; SetADAccountPassword -identity $_.SamAccountName -NewPassword (ConvertTo-SecureString
-AsPlainText $_.Password -Force) -Reset ; Enable-ADAccount -identity $_.SamAccountName;
Set-ADUser -Identity $_.SamAccountName -ChangePasswordAtLogon $true}
-SamAccountName
$_.SamAccountName
-UserPrincipalName $userprinicpalname
-Name $_.name
-DisplayName $_.name
-GivenName $_.cn
-SurName $_.sn
-Department $_.Department
-Path $_.path
-ChangePasswordAtLogon
: Damitha
: [email protected]
: Damitha Anuradha
: Damitha Anuradha
: Damitha
: Anuradha
: Engineering
: OU=Users,OU=Production,DC=doitfixit,DC=local
: Enable User must change Password at Next Log on
option
e.g. To add Description value insert -Description $_.description in to the command line.