best business builder

Creating Test Users In Bulk Using Powershell

There is always a requirement to create test users in bulk in your lab, maybe even in live network to test something. You can quickly create mailbox users using a one liner. Run the command.

1..100 | ForEach { Net User “User$_” MyPassword=01 /ADD /Domain; Enable-Mailbox “User$_” -Database “Mailbox Database”

Moral of the story – Do read the tips…

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.

one click social media designs

Leave a Reply

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