POWERSHELL

Create multiple test user accounts

Import-Module ActiveDirectory          
foreach($i in 1..10)
{
$AccountName = "TestUser{0}" -f $i
$Password = Convertto-secureString -string "password" -AsPlainText New-ADUser -Name $AccountName -AccountPassword $Password -Path "OU=testing,DC=pugazh,DC=in" -Enabled:$true }

Leave a Reply

Your email address will not be published. Required fields are marked *