Bulk User Import on Active Directory
After the completion of the Domain Installation and Configuration on my previous blog, now it’s time to get user creation so that users may use the Domain facilities. On this blog we basically see two (2) different methods to create a user
- Single user creation
- Bulk user Import
Firstly, let us go with the simple user creation i.e. Single use creation. All our users are pooled on Active Directory Users and Computers, which can be accessed on Domain Controller by opening ‘Server Manager’ à Tools à Active Directory Users and Computers.
Or
Another method is Open ‘RUN’ Typeà DSA.MSC this will also allow you to open Active Directory User and Computers.
This is the view of Active Directory User and Computers, over here by default you will find out the Built in user/Groups and OU’s. For better knowledge of Designing OU’s you can visit this link, it has a quite good explanation for how do we manage OU’s or say how do we architect OU. For me I follow this link.
Now let us start with simple method of creating user. On Active Directory User and Computers, we can see a button on Menu Bar to create a user as shown on below snap. Click on it.
Once button is clicked, it will prompt a new window with title ‘New Object – User’. Filling the form is simple, just fill it as your organization naming structure. I don’t think it’s quite hard to move. Once the form is filled click on ‘Next’.
On Next window provide the password for the user, over here you do have no. of option for password. For the better security and user identity, check ‘User must change password at next logon’. For Password, by default it requires complex password i.e. combination of alphanumeric and symbol.
On the last window, you can see Finish button, click on it to complete the user creation.
This is the process how we create user one by one. But the thing is I do have a new Active Directory Domain and where I need to create 500 users, how do we do it??? Is it the same way that of the above process?? If so than it will kill me a lot of time just for creation of users. So, here we go for the advance mode to create Bulk user or we say import bulk users.
Now let’s see how can we import bulk user with advance mode. For that we require the list of users, as per formatted on below snap of excel and it should be saved on ‘comma delimited CSV’. Also I have upload this sample CSV file for your help. Click Here to download it.
Note: To import the Bulk user, you need have OU already existed on your Active Directory path.
Once you create this document, you can use this PowerShell script to import bulk user on your ‘Active Directory Users and Computer’. To run this script you need Administrative privilege
Import-Csv .bulkupload.csv | foreach-object { New-ADUser -Name $_.DisplayName -UserPrincipalName $_.UserPrincipalName -SamAccountName $_.Username -GivenName $_.GivenName -DisplayName $_.DisplayName -Initials $_.MiddleInitial -SurName $_.Surname -Path $_.Path -AccountPassword (ConvertTo-SecureString $_.Password -AsPlainText -force) -Enabled $True -PasswordNeverExpires $True -PassThru }
Here is the snap shot of how we can do it.
If the script is running correctly, you can see codes like this getting generated on your PowerShell.
If the scripts run smoothly, you can see the users has been already generated on you ‘Active Directory Users and Computer’ window view.
Also from Server 2008 you do have another Console to manage user, it’s quite easy to use…. This is called ‘Active Directory Administrative Center’ try to check this view too…. It’s has been made quite easy for the admins. J
Thank you very much man.Appreciate it.