Create test users with Powershell

Two very simple commands (in powershell) to create test users with Powershell and the built in commands.

Create 50 users in Active Directory
1..50 | ForEach { Net User "Exchange$_" Password1 /ADD /Domain }
Create 50 users in Active Directory and also create an mailbox on Exchange 2010
1..50 | ForEach { Net User "Exchange$_" Password1 /ADD /Domain; Enable-Mailbox “User$_” -Database “Mailbox Database” }

No comments: