Creating Bulk Users in Active Directory Using PowerShell

We had a requirement of creating bulk users in Active directory for Test users. Initially i thought of wrtting .NET code which will communicate to LDAP and creates the users.
but i was not aware of that it can be done very-2 quickly using the Powershell with 3-4 line of scripts.

we had a csv file which had all the users with AD information in it. The Format of that csv is some thing like the below one:

Please change the {Domain Name} with your Environment Domain name.

Below is powershell script which will create users in Active directory, please ensure to run this powershell script in "Active Directory Module For Windows PowerShell".
UserCreationfile.csv is a csv filename which has all users information.

Import-Csv .\usercreationfile.csv | foreach-object {
$userprinicpalname = $_.SamAccountName + "@{domainname}.com"
New-ADUser -SamAccountName $_.SamAccountName -UserPrincipalName $userprinicpalname -Name $ -DisplayName $ -GivenName $ -SurName $ -Department $_.Department -Path "CN=Users,DC=biogen,DC=com" -AccountPassword (ConvertTo-SecureString "Microsoft~1;" -AsPlainText -force) -Enabled $True -PasswordNeverExpires $True -PassThru }

Once we Execute above powershell statements, we will see the results like the below:

Hope this will help.

Happy Coding !!!