$file = "C:\userfile.csv"
Import-Csv -Path $file | ForEach-Object {
New-ADUser -SamAccountName $_.SamAccountName `
-Path $_.Path `
-GivenName $_.GivenName `
-Surname $_.Surname `
-Initials $_.Initials `
-Name $_.Name `
-DisplayName $_.DisplayName `
-UserPrincipalName $_.UserPrincipalName `
-Department $_.Department `
-Description $_.Description `
-Office $_.Office `
-MobilePhone $_.MobilePhone `
-StreetAddress $_.StreetAddress `
-POBox $_.POBox `
-City $_.City `
-State $_.State `
-PostalCode $_.PostalCode `
-Title $_.Title `
-Company $_.Company `
-Country $_.Country `
-EmailAddress $_.EmailAddress `
-AccountPassword (ConvertTo-SecureString $_.Password -AsPlainText -Force) `
-Enabled $true `
-ChangePasswordAtLogon $true
}
Template to be used with this script.