1..100 | ForEach { Net User "User$_" MyPassword=01 /ADD /Domain; Enable-Mailbox "User$_" -Database "Mailbox Database"
Another method which I use very often is shown below. Get a password and store it as a secure string in a variable and use the variable in the new mailbox creation process.
$password = Read-Host "Enter Password" -AsSecureString
Then run the command shown in the snapshot to create test users in bulk. Change the numbers depending upon the number of test users you need.
No comments:
Post a Comment