How to Create a New Mailbox in Exchange Management Shell

In this article we are going to see how to create a new mailbox in Exchange 2010 server using Exchange Management Shell (EMS).

Introduction:

In previous article, we have learned how to use Exchange management console to create a new user mailbox. Today we are going to see how to create a new mailbox using Exchange management Shell (EMS). Usually EMS will be very helpful for doing the tasks in bulk. We can execute Exchange PowerShell scripts in EMS. It will be helpful to recover any user data, however during any recovery requirement it is best to consider OST recovery option also which will save lot of our time.

Using Exchange Management Shell:

In order to open Exchange Management Shell (EMS), please click “Start” –> “All Programs” –> “Microsoft Exchange Server 2010” –> “Exchange Management Shell”. It is always advisable to run the EMS with administrator access. So right click on EMS and run as admin.Open Exchange Management Shell

By default it will open the System32 path. In case you would like to change it to any drive or a different path, you can do so by using a cd (change directory) command. It will be useful to run any script under a specific path. I am using all possible example to explain in the below screenshot. Since I have only one drive I will not be able to change the drive. If you wanted to change it to D:\ drive then you can use “d:” command to change it to D:\ drive.Change Path By Using A CD Command

Now let’s see how to create a mailbox. It has all switches that were used in Exchange management console. I am using New-Mailbox command to create a user mailbox. Similar to that we have other parameters to create room, equipment or linked mailboxes.

To create a secure string object for the password, I am going to store the password in the variable called $password and then I will call that variable in the new-mailbox command.Create A Secure String Object For The Password

I have successfully stored the password in the variable. Now let me execute the command to create a new mailbox. I am using the same option that I have used to create a test mailbox 1 in Exchange management Console to give a better idea to you. We have multiple switches that we can use for our requirement. I would encourage you to read this Microsoft to understand all its parameter.Execute The Command To Create A New Mailbox

Great!! The mailbox has been created successfully. In order to see the full information, you can invoke the following “Get-Mailbox” command. If you use the “FL” switch, it will give you the full list for any object that is getting executed in a command. Invoke The “Get-Mailbox” Command

Conclusion:

It is way more fun to work with Exchange management shell than Exchange management console to create any object or edit any existing objects. Initially it will be little difficult to handle the commands, however once you got used to it, then you will start loving it and prefer to work with it than going for Graphical User Interface (GUI). If you are good at Windows PowerShell (PS) then it will be like a piece of cake for you.

Author Introduction:

Sophia Mao is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including outlook recovery and word recovery software products. For more information visit www.datanumen.com

Comments are closed.