Create Bulk Mailboxes in Microsoft Exchange Server 2010 & 2013

A fast process we require to do often;  to create multiple mailboxes at one go…

And the Script Follows: (Study the script please for your future growth)

$numberofMailboxes = Read-Host “Enter the Number of Mailboxes you want” 
$EnterPrefix = Read-Host “Enter the Prefix of the Account” 
$GettingPassword = Read-Host “Enter the Password for the accounts” 
$Password = Convertto-SecureString “$GettingPassword” -Asplaintext -Force 
$GettingEmailSuffix = “((Get-AcceptedDomain)[0]).Name” 
$mail = “@”+”$GettingEmailSuffix” 
For($i=0;$i -le $numberofMailboxes;$i++) 

$UPN = “$EnterPrefix”+”$i”+”$mail” 
$Name = “$EnterPrefix”+”$i” 
New-Mailbox -Name $Name -Alias $Name -UserPrincipalName $Upn -Password $Password 
}

And the input required from you:

  • Enter the number of mailboxes you want to create
  • Enter names of the account; just give it some understandable name
  • and provide the generic password for all of the created accounts

The ScreenShot would look like the following: (Tested platforms are located at the end of the post)

 

bulkuser

 

 

 

 

Windows Server 2012 Yes
Windows Server 2008 R2 Yes
Windows Server 2008 Yes