Share via


Creating Bulk New User Mailboxes in Exchange 2007/2010/ 2013 using Script

Bulk User Mailbox creation let’s discuss Step by Step

 

Step1: Creating Mailbox Database

Step2: Creating New User Mailbox in GUI

Step3: Creating Bulk New User Mailboxes using cmdlet

 

Creating Mailbox Database

 

Launch Exchange Admin Center

 

http://www.techrid.com/wp-content/uploads/2014/12/E15DBS1-154x300.png

 

 Click Servers

 

In the middle of the page you can find Databases as shown below

 

http://www.techrid.com/wp-content/uploads/2014/12/E15DBS2-300x137.png

 

 

Click the “+” Tab

 

Provide the details as Mailbox Database Name and Browse the Server and Click Save.

 

 

http://www.techrid.com/wp-content/uploads/2014/12/E15DBS3-271x300.png

 

 

Click Save.

 

When you click Save you might get warning Message to restart the Information Store.

 

http://www.techrid.com/wp-content/uploads/2014/12/E15DBS4-300x243.png

 

 

 

Click Ok

 

Great we have created Database Successfully. Now let’s  go ahead and create User Mailbox

 

 Step2: Creating User Mailbox

 

http://www.techrid.com/wp-content/uploads/2014/12/E15DBS5-300x178.png

 

Under Mailboxes you can see the list of users. Those Mailboxes are residing in Exchange Server 2007

 

As we have discussed this is Coexistence with Exchange 2007 & 2013

 

Click on Add Button as Shown below and Select User Mailbox

 

http://www.techrid.com/wp-content/uploads/2014/12/E15DBS6-300x103.png

 

 

Click on User Mailbox

 

http://www.techrid.com/wp-content/uploads/2014/12/E15DBS7-280x300.png

 

 

Click Save.

 

By this we have created Database and User Mailboxes.

 

Step3: Creating Bulk New User Mailboxes

 

CMDLET for Bulk User Mailbox creation:

 

Step1: Creating CSV File:

 

First prepare list of all new users and mailboxes in a CSV file (Comma Separated Values). Easiest way to do it would be to use Microsoft Excel, even ordinary Notepad can be used to create such file.

 

Additional values can be added here – virtually for every field available in the Active Directory. Example CSV user list looks like that:

 

Name,Alias,ServerName

 

Test6,Test_6,Test6@DC1.COM

Test7,Test_7,Test7@DC1.COM

Test8,Test_8,Test8@DC1.COM

Test9,Test_9,Test9@DC1.COM

Test10,Test_10,Test10@DC1.COM

 

 The header of the list is Very Important.

 

Once the list is ready, it needs to be saved as a CSV file with a relatively simple name – it will be used later in the script pulling data from it.

 

Example it was called CreateMailboxes.csv.

 

http://www.techrid.com/wp-content/uploads/2014/12/E15UMB1.png

 

Step2: Assigning the password:

Now after creating file with list user Mailboxes, the next criteria is Password for all the list of new users. Manually assigning a new password for every single user will be time consumption.

This also can be done by simple cmdlet using “Exchange Management Shell” as shown below:

$Password=Read-Host “Enter Password” –AsSecureString
**
**

http://www.techrid.com/wp-content/uploads/2014/12/E15UMB2-300x53.png

 

A notification asking for the password will be displayed. We can now input the desired phrase – it will become the password for all the new users from the CSV list. It can always be changed later according to individual needs.

 

Step3: Importing the CSV file and creating the mailboxes

 

The final step involves importing the CSV file we have prepared earlier and creating the mailbox-enabled user accounts. To do that, we need to issue the following command in the Exchange Management Shell:

 

Import-CSV “CreateMailboxes.csv” | ForEach {New-Mailbox -Alias $_.alias -Name $_.name -userPrincipalName $_.UPN -Database “Mailbox Database” -OrganizationalUnit Users -Password $Password}

 

http://www.techrid.com/wp-content/uploads/2014/12/E15UMB3-300x44.png

The script presented above can be modified according to your requirement and needs.