Welcome and this lesson will be talking about creating modifying and removing mailboxes.
But before you start them you should know that from the systems where you have installed Exchange Server
2016 management tools you can administer your Exchange server environment with Windows powers shell
by starting the Exchange management shell from the start menu.
When you start a normal Windows BOA's shell or Windows powers shell aier secession.
Like come on let's that you're required to manage Wishings server are not available immediately.
However if you install the exchange server 2016 management tools locally you can add Exchange management
shell support to do this just run the following command.
You have to import module which is located on the following path and then connect Exchange server.
I'll be demonstrating the command on IAC won't be connected to exchange server or so to run the exchange
command.
I have to add exchange related snap in him so I'll run at P.S. PM.
By the way to view all the available snippiness you can run the following command.
Get --.
Pain and it will reveal all their whaleboat snare pins.
I'll add to all those opinions which have exchanged Ruritanian.
So now let's switch to create and modify and remove and mailboxes.
It's one of the most common tasks performed within the exchange management shell is mailbox management
and this lesson will take a look at command syntax required to create update and remove mailboxes from
your exchange organization.
The concepts outlined in this lesson can be used to perform basic day to day tasks and will be used
for more advanced scenarios such as Great mailboxes and Baalke.
So lets start off by greed in a mailbox enabled active directory user account to do this.
We can use their new mailbox command Latt as shown in this example.
So take a first look at least code and will review it in more detail in just a few seconds.
Once the mailbox has been created we can modify it using the set mailbox command left and to remove
the exchange attributes from the active directory user account and Margalla mailbox in the database
for removal.
You can use the disable mailbox command let.
Now let's take a closer look at the following command.
When running then you mailbox command let the password parameter is required.
Anti-O need to provide to well-you for it.
You can do this by using a secure string object as you can see from the code we've used the convert
to secure string command left to create a password to wearable.
That's Tauruses pacifier.
Well you have an encrypted stream.
This password wearable is them assigned to the password parameter.
When running the command left there is no requirement for first to store this object in a wearable.
You could put this slime wherever you want in this command let.
Of course keep in mind that the password to used here needs to comply with your active directory of
password Burleson's which may enforce a minimum pass for Lance and have requirements for complexity
only a few parameters are actually required when running a new mailbox but the command letter itself
supports several useful parameters that can be used to set certain properties when creating the mailbox.
And of course you can run get help new mailbox with detailed parameter to determine which additional
parameters are supported.
Then your mailbox command lead creates an active directory user and then mailbox enables that account.
We can also create mailboxes for existing users with the Enable mailbox command left.
We could use it for an sumed to access for these command let enable mailbox Steve and database parameter
for example D-B won it will enable mailbox for Steve user in database D-B 1.
So the only requirement one running the enabled mailbox command letter is that you Brue white the identity
of the active directory user that should be mailbox enabled in the previous example they've specified
the database in which their mailbox should be created.
But this is optional.
They enable mailbox command that supports a number of other parameters that you can use to control their
initial settings for the mailbox.
You can use a simple one line or to create mailboxes in Baalke for xist an active directory users.
For example you can get a user recipient type detail's user and pipe it to enable mailbox with database
parameter.
For example D-B one note that we have raúl that get to use a command let's say fine user Well you know
for the recipient type details parameter.
This will receive only those accounts in active directory that have not been mailbox enabled will then
pipe those objects down to the Enable mailbox command left and mailboxes are created for each of those
users in one simple operation once.
Mailboxes have been created.
They then can be modified to either set mailbox command led as you may recall from our original example
we used the set mailbox command led to configure custom storage quarter ends after creating a mailbox
for Dave Jones.
Keep in mind that the set mailbox command lets supports almost 200 parameters.
So anything that can be done to modify a mailbox can be scripted to but modification to mailboxes can
be done easily by taking advantage of the pipeline.
And the sad mailbox command led instead of configuring storage quarters on a single mailbox.
We can do it for multiple users at once.
So we could do it with the following command.
Get mailbox be an organizational unit sales by it to said mailbox.
We use database quarter defaults parameter which is false and prohibit Santror receive water for five
G-B and issue 1 and quarter 4 for GAAP.
Here we are simply retrieve in every mailbox of the sales.
Oh you use and get mailbox come and let the objects return from the command are bribed down to that
mailbox which modifies what are settings for each mailbox in one shot.
No the disable mailbox command let Rose dribbler exchange attributes from the active directory user
and we'll disconnect the associated mailbox by default disconnected mailboxes are retained for 30 days.
You can modify these settings on the database that holds the mailbox in addition to this.
You can to use the remove mailbox command left to delete both the active directory current and the mailbox
at the same time.
So take a look at this command.
Remove mailbox identity Dave.
Confirm false.
After running this command the mailbox will be purged once it exceeds the deleted mailbox.
Retentions said in all the database.
One common mistake is when administrators use the remove mailbox command Latt when the disable mailbox
command left should have been used.
It's important to remember that the remove mailbox command left will delete the active directory user
account and mailbox while the disable mailbox command left.
Only remove the mailbox but the active directory user account will still remain now.
When we are around then you mailbox command Loughton the previous examples.
Are silent as securest through an object to the password parameter using the convert to secure string.
Come on out.
This is a great technique to use when you scripts need complete automation but you can also allow an
operator to enter this information interactively.
For example you might build a script that prompts an operator for a password when great in one or more
mailboxes.
There are a couple of ways you can do this.
First you can use the read host command left to prompt the user running the script to enter a password
once the role has been entered into the shell.
Your script can as Sylar pass wearable to the brasswork parameter or the new mailbox command lad.
Alternatively you can supply Well you for a password parameter using the get credentialed command led.
You could run the following code with new mail box command let rewired and the details like name and
user principle name and two you can see them there while you are assigned to the birth for parameter.
In this example is actually the Basford property of the object returned by the get credentials among
left executor in this command tril forest lawn chair vendors or authentication dialog box where the
caller can Antar a username and password.
And once the credential object has been created then you mailbox command Latrell wrong.
Even though a username and password must be entered into the oath and to Keeshan dialog box only the
password.
Well you will be used when the command runs.
And again make sure that the password Antar that suits your organizational password policy is now a
commonly used mailbox type is a shared mailbox which is really march where the name says and mailbox
share between different individuals.
The difference between this mailbox type and the regular user mailbox is that the shared mailbox is
a typical disabled to active directory object.
Therefore no one can use this username to log on interactively with these mailboxes are simply created
by using the following command Latin parameters.
New mailbox name and share parameter.
This example shows you how to create this shared mailbox.
The only difference between the shared mailbox and a regular mailbox is the addition of the parameter
of Sherratt into the command left some words about certain active directory attributes some are in the
active directory attributes that you might want to set when creating a mailbox might not be a whaleboat
using the new mailbox command left.
Good examples of this are a user a city state company and department attributes in order to serve these
attributes.
You'll need to call the set user command left after the mailbox has been created.
Please take a look at this example.
And of course you can always Thuram get help set user.
There's detailed to view all the whaleboat parameter supported by this command left.
So to set these attributes you could run the following code search to user identity Dave office.
I t see to settle a state is Washington and police know that they come and let's say that user is an
active directory command left and not an exchange Come on let.