Creating Test AD users with Powershell- Improved!
Remember the PoSH add users to AD script? Well, it got picked up by “The Man” himself, Dmitry Sotnikov of PowerGUI fame and he rolled it into a one-liner:
1..500 | ForEach-Object {
New-QADUser -ParentContainer ps64.local/test -Name “testuser$_“ -SamAccountName “testuser$_“ -UserPrincipalName “testuser$_@example.com“ -FirstName “testUser$_“ -LastName “example$_“ -UserPassword “password_123“ | Enable-QADUser
}
Steve Green and I, coincidentally, were having a go at getting it as short as possible and eventually came down to the same steps but Awesome to see “The Internet” at work!
Enjoy!