I used to save code snippets as blog posts earlier. Resuming the practice, so don’t be alarmed by lack of text in this post. If you want to see detailed posts about creating bulk mailboxes, check out these previous posts:
- Bulk mailbox-enabling users using Exchange Shell in Exchange 2010 and Exchange 2007
- Exchange Server 2007: Bulk creation of mailboxes using Exchange Management Shell
- Bulk mailbox creation: Import passwords from a file
- Bulk mailbox creation revisited: Adding Active Directory attributes
Create 5 test mailboxes – username = “tester” + number.
$pw=(get-credential).password;for ($i=1; $i -le 5; $i++){$username=”tester”+$i;$upn=”$username@mydomain.com“;write-host “Username:”$Username “UPN:”$upn;new-mailbox -name $username -alias $username -password $pw -userprincipalname “$upn”}
Change the highlighted number in the condition statement to create as many mailboxes as you need. Change mydomain.com to a valid UPN suffix from your Active Directory forest.
As indicated in above posts, if you’re on Exchange 2007, you’ll need to specify the Database parameter. Exchange 2010 and later can select the mailbox database automatically (but still allow you to specify it if you want).
{ 0 comments… add one now }