0% found this document useful (0 votes)
52 views

Bulk Users PDF

This document provides a step-by-step guide for creating multiple users in Active Directory. It instructs the user to first create the necessary OU structure and password policy. A CSV file with user attributes should then be created using the provided template. This file can be imported into Active Directory using PowerShell commands like New-ADUser and Set-ADAccountPassword while specifying attributes from the CSV like name, username, and department.

Uploaded by

unix500
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Bulk Users PDF

This document provides a step-by-step guide for creating multiple users in Active Directory. It instructs the user to first create the necessary OU structure and password policy. A CSV file with user attributes should then be created using the provided template. This file can be imported into Active Directory using PowerShell commands like New-ADUser and Set-ADAccountPassword while specifying attributes from the CSV like name, username, and department.

Uploaded by

unix500
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

http://www.doitfixit.com/index.php?

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.

To get first name from a cell =LEFT(A2,FIND(".",A2,1))


To get last name from a cell =RIGHT(A2,LEN(A2)-FIND(".",A2,1))

Active Directory User Creation Template


Attachments:
AD Bulk User Template (CSV) 0.2 Kb 1348 Downloads
AD Bulk User Template (Excel) 9 Kb 1303 Downloads
Save the excel file as CSV (Comma delimited) and copy in to Active Directory Server.

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.

You might also like