The first point when creating a new mailbox in Exchange 2010 is does
the User Object already exist in Active Directory? In which case you
just need to Mail-Enable that
user.
Alternatively, do you need an example of how to create a brand new user complete
with Exchange 2010 mailbox? In which case read on, I will explain
all the steps necessary to succeed.
Note 1: Because I wanted to highlight the Parameters with their
values I used the backtick (`) to tell PowerShell the command
continues on the next line.
Note 2: Once you create a mailbox enabled user you may like to check
the result
with the sister PowerShell cmdlet: Get-Mailbox.
Get-Mailbox -Identity "Guido Thomas"
See more about Get-Mailbox.
Another scenario is that you want to change the values, for that I would use
Set-Mailbox.
Guy Recommends: SolarWinds' Free Bulk Mailbox Import Tool
Import users, complete with mailbox from a spreadsheet. Just provide a list of the
users with the fields in the
top row, and save as .csv file. Then launch this FREE utility and match
your Exchange fields with AD's
attributes, click and import the users. Optionally, you can
provide the name of the OU where the new mailboxes will be born.
There are also two bonus tools in the free download, and all 3 have been approved by Microsoft:
Bulk-import new users and mailboxes into Active Directory.
Before I create a user and their mailbox with PowerShell I like to have a
manual walk-through. For instance, EMC, New Mailbox reminds me that Alias cannot have
spaces.
Launch the EMC, navigate to the Recipient Configuration
Another benefit of creating a test user manually is that it spurs me to
research more parameters or user properties with PowerShell's own Get-Help
Get-Help Get-Mailbox
Note 3: Rarely have I seen a PowerShell cmdlet with so many parameters, for
example, Office, Phone and Department, to name but three.
Note 4: Even though I have used this technique many times: Get-Help
Verb-PowerShellNoun, the results never cease to surprise me for example, you could create a
'Room' or 'Building' type of Exchange 2010 mailbox.
One of the reasons for scripting is to tackle repetitive tasks such as bulk
import of users. My approach is to
break the task down in to steps. Get each component working then bolt
it all together.
In this instance I would learn how to create one user with their mailbox
(see above).
Here is a
free tool to monitor your Exchange Server. Download and
install the utility, then inspect your mail queues, monitor the Exchange
server's memory, confirm there is enough disk space and check the CPU
utilization. This is the real deal - there is no catch. SolarWinds
provides this fully-functioning product for free, as part of their commitment to
supporting the network management community.
Summary of Create Exchange Mailbox with PowerShell
It's not that easy to create mail-enabled objects in PowerShell.
It takes time to master all the New-Mailbox parameters; in particular to
identify all the required properties for the user.
If you like this page then please share it with your friends
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft operating systems.
Fortunately, SolarWinds
have created the
Free WMI Monitor so that you can actually see and understand these gems of
performance information. Take the guess work out of which
WMI counters to use for applications like Microsoft Active Directory,
SQL or Exchange Server.