In this video I will show you how to create bulk users in Active Directory using Power Shell.
🔔 Subscribe to become a PowerShell Pro! https://www.youtube.com/@matthewdaugh...
Note: In previous videos I have been told when the code is copied from the description some people get weird errors.
--------------------------------------------------------------------------------------------------------
$csv = "C:\Users\Administrator\Documents\PowerShell\inputfiles\tstusers.csv"
$ou = "OU=EntUsers,OU=users and groups,DC=Contoso,DC=com"
$date = (Get-Date -f MM-ddd-yyy)
$description = "Test account created on $date"
$users = Import-csv $csv
foreach($user in $users){
Write-Output "Creating $($user.Name)"
New-ADUser -Name $user.name `
-AccountPassword (ConvertTo-SecureString "P@$$w0rd" -AsPlainText -Force) `
-Enabled:$true `
-Path $ou `
-Description $description
}
Watch video Power Shell Bulk User Creation online without registration, duration hours minute second in high quality. This video was added by user PowerShellNerd 06 September 2016, don't forget to share it with your friends and acquaintances, it has been viewed on our site 731 once and liked it 4 people.