WEBVTT

00:00.450 --> 00:07.350
Welcome and this lesson will be talking about creating modifying and removing mailboxes.

00:07.350 --> 00:14.750
But before you start them you should know that from the systems where you have installed Exchange Server

00:14.820 --> 00:24.210
2016 management tools you can administer your Exchange server environment with Windows powers shell

00:24.450 --> 00:29.400
by starting the Exchange management shell from the start menu.

00:29.550 --> 00:35.600
When you start a normal Windows BOA's shell or Windows powers shell aier secession.

00:35.710 --> 00:43.020
Like come on let's that you're required to manage Wishings server are not available immediately.

00:43.020 --> 00:51.540
However if you install the exchange server 2016 management tools locally you can add Exchange management

00:51.540 --> 00:56.350
shell support to do this just run the following command.

00:56.430 --> 01:05.390
You have to import module which is located on the following path and then connect Exchange server.

01:05.520 --> 01:14.400
I'll be demonstrating the command on IAC won't be connected to exchange server or so to run the exchange

01:14.400 --> 01:14.920
command.

01:14.960 --> 01:22.460
I have to add exchange related snap in him so I'll run at P.S. PM.

01:22.560 --> 01:28.160
By the way to view all the available snippiness you can run the following command.

01:28.170 --> 01:29.280
Get --.

01:29.440 --> 01:33.870
Pain and it will reveal all their whaleboat snare pins.

01:33.900 --> 01:39.000
I'll add to all those opinions which have exchanged Ruritanian.

01:39.150 --> 01:45.070
So now let's switch to create and modify and remove and mailboxes.

01:45.210 --> 01:53.310
It's one of the most common tasks performed within the exchange management shell is mailbox management

01:53.560 --> 02:02.010
and this lesson will take a look at command syntax required to create update and remove mailboxes from

02:02.010 --> 02:04.740
your exchange organization.

02:04.740 --> 02:13.410
The concepts outlined in this lesson can be used to perform basic day to day tasks and will be used

02:13.650 --> 02:19.690
for more advanced scenarios such as Great mailboxes and Baalke.

02:19.740 --> 02:27.320
So lets start off by greed in a mailbox enabled active directory user account to do this.

02:27.390 --> 02:33.560
We can use their new mailbox command Latt as shown in this example.

02:33.720 --> 02:41.690
So take a first look at least code and will review it in more detail in just a few seconds.

02:41.730 --> 02:50.610
Once the mailbox has been created we can modify it using the set mailbox command left and to remove

02:50.610 --> 02:58.200
the exchange attributes from the active directory user account and Margalla mailbox in the database

02:58.500 --> 02:59.780
for removal.

02:59.790 --> 03:03.510
You can use the disable mailbox command let.

03:03.640 --> 03:07.890
Now let's take a closer look at the following command.

03:07.890 --> 03:14.230
When running then you mailbox command let the password parameter is required.

03:14.330 --> 03:17.290
Anti-O need to provide to well-you for it.

03:17.340 --> 03:24.930
You can do this by using a secure string object as you can see from the code we've used the convert

03:24.960 --> 03:30.030
to secure string command left to create a password to wearable.

03:30.150 --> 03:32.000
That's Tauruses pacifier.

03:32.010 --> 03:34.760
Well you have an encrypted stream.

03:34.860 --> 03:41.060
This password wearable is them assigned to the password parameter.

03:41.130 --> 03:48.830
When running the command left there is no requirement for first to store this object in a wearable.

03:48.900 --> 03:53.850
You could put this slime wherever you want in this command let.

03:53.970 --> 04:00.210
Of course keep in mind that the password to used here needs to comply with your active directory of

04:00.240 --> 04:08.180
password Burleson's which may enforce a minimum pass for Lance and have requirements for complexity

04:08.520 --> 04:16.430
only a few parameters are actually required when running a new mailbox but the command letter itself

04:16.440 --> 04:25.460
supports several useful parameters that can be used to set certain properties when creating the mailbox.

04:25.470 --> 04:33.360
And of course you can run get help new mailbox with detailed parameter to determine which additional

04:33.360 --> 04:35.770
parameters are supported.

04:35.790 --> 04:44.870
Then your mailbox command lead creates an active directory user and then mailbox enables that account.

04:44.880 --> 04:52.160
We can also create mailboxes for existing users with the Enable mailbox command left.

04:52.170 --> 05:01.450
We could use it for an sumed to access for these command let enable mailbox Steve and database parameter

05:01.540 --> 05:09.930
for example D-B won it will enable mailbox for Steve user in database D-B 1.

05:10.000 --> 05:18.670
So the only requirement one running the enabled mailbox command letter is that you Brue white the identity

05:18.730 --> 05:27.120
of the active directory user that should be mailbox enabled in the previous example they've specified

05:27.140 --> 05:31.680
the database in which their mailbox should be created.

05:31.840 --> 05:33.830
But this is optional.

05:33.830 --> 05:42.280
They enable mailbox command that supports a number of other parameters that you can use to control their

05:42.520 --> 05:45.280
initial settings for the mailbox.

05:45.280 --> 05:54.070
You can use a simple one line or to create mailboxes in Baalke for xist an active directory users.

05:54.070 --> 06:04.240
For example you can get a user recipient type detail's user and pipe it to enable mailbox with database

06:04.240 --> 06:05.150
parameter.

06:05.170 --> 06:14.290
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

06:14.440 --> 06:18.010
for the recipient type details parameter.

06:18.010 --> 06:26.980
This will receive only those accounts in active directory that have not been mailbox enabled will then

06:27.010 --> 06:36.280
pipe those objects down to the Enable mailbox command left and mailboxes are created for each of those

06:36.280 --> 06:40.020
users in one simple operation once.

06:40.090 --> 06:42.220
Mailboxes have been created.

06:42.220 --> 06:51.010
They then can be modified to either set mailbox command led as you may recall from our original example

06:51.310 --> 07:00.130
we used the set mailbox command led to configure custom storage quarter ends after creating a mailbox

07:00.160 --> 07:01.600
for Dave Jones.

07:01.600 --> 07:08.630
Keep in mind that the set mailbox command lets supports almost 200 parameters.

07:08.740 --> 07:17.470
So anything that can be done to modify a mailbox can be scripted to but modification to mailboxes can

07:17.470 --> 07:21.770
be done easily by taking advantage of the pipeline.

07:21.790 --> 07:29.720
And the sad mailbox command led instead of configuring storage quarters on a single mailbox.

07:29.770 --> 07:33.730
We can do it for multiple users at once.

07:33.730 --> 07:36.030
So we could do it with the following command.

07:36.040 --> 07:42.790
Get mailbox be an organizational unit sales by it to said mailbox.

07:42.910 --> 07:52.980
We use database quarter defaults parameter which is false and prohibit Santror receive water for five

07:52.990 --> 07:57.660
G-B and issue 1 and quarter 4 for GAAP.

07:57.690 --> 08:02.500
Here we are simply retrieve in every mailbox of the sales.

08:02.650 --> 08:10.840
Oh you use and get mailbox come and let the objects return from the command are bribed down to that

08:10.840 --> 08:17.320
mailbox which modifies what are settings for each mailbox in one shot.

08:17.430 --> 08:25.330
No the disable mailbox command let Rose dribbler exchange attributes from the active directory user

08:25.600 --> 08:35.590
and we'll disconnect the associated mailbox by default disconnected mailboxes are retained for 30 days.

08:35.620 --> 08:42.750
You can modify these settings on the database that holds the mailbox in addition to this.

08:42.880 --> 08:52.960
You can to use the remove mailbox command left to delete both the active directory current and the mailbox

08:52.960 --> 08:54.280
at the same time.

08:54.430 --> 08:56.290
So take a look at this command.

08:56.290 --> 08:58.970
Remove mailbox identity Dave.

08:59.270 --> 09:00.840
Confirm false.

09:00.880 --> 09:08.270
After running this command the mailbox will be purged once it exceeds the deleted mailbox.

09:08.270 --> 09:11.470
Retentions said in all the database.

09:11.470 --> 09:20.570
One common mistake is when administrators use the remove mailbox command Latt when the disable mailbox

09:20.590 --> 09:22.830
command left should have been used.

09:22.840 --> 09:30.790
It's important to remember that the remove mailbox command left will delete the active directory user

09:30.790 --> 09:36.590
account and mailbox while the disable mailbox command left.

09:36.670 --> 09:44.330
Only remove the mailbox but the active directory user account will still remain now.

09:44.380 --> 09:48.950
When we are around then you mailbox command Loughton the previous examples.

09:49.110 --> 09:57.640
Are silent as securest through an object to the password parameter using the convert to secure string.

09:57.640 --> 09:58.730
Come on out.

09:58.780 --> 10:07.410
This is a great technique to use when you scripts need complete automation but you can also allow an

10:07.410 --> 10:12.080
operator to enter this information interactively.

10:12.110 --> 10:20.060
For example you might build a script that prompts an operator for a password when great in one or more

10:20.060 --> 10:21.320
mailboxes.

10:21.320 --> 10:24.080
There are a couple of ways you can do this.

10:24.080 --> 10:32.240
First you can use the read host command left to prompt the user running the script to enter a password

10:32.510 --> 10:36.050
once the role has been entered into the shell.

10:36.050 --> 10:44.300
Your script can as Sylar pass wearable to the brasswork parameter or the new mailbox command lad.

10:44.480 --> 10:52.310
Alternatively you can supply Well you for a password parameter using the get credentialed command led.

10:52.460 --> 11:00.740
You could run the following code with new mail box command let rewired and the details like name and

11:00.980 --> 11:08.150
user principle name and two you can see them there while you are assigned to the birth for parameter.

11:08.150 --> 11:16.530
In this example is actually the Basford property of the object returned by the get credentials among

11:16.560 --> 11:24.320
left executor in this command tril forest lawn chair vendors or authentication dialog box where the

11:24.320 --> 11:28.080
caller can Antar a username and password.

11:28.250 --> 11:34.690
And once the credential object has been created then you mailbox command Latrell wrong.

11:34.700 --> 11:42.260
Even though a username and password must be entered into the oath and to Keeshan dialog box only the

11:42.260 --> 11:42.990
password.

11:43.020 --> 11:47.290
Well you will be used when the command runs.

11:47.360 --> 11:56.210
And again make sure that the password Antar that suits your organizational password policy is now a

11:56.210 --> 12:05.150
commonly used mailbox type is a shared mailbox which is really march where the name says and mailbox

12:05.150 --> 12:08.220
share between different individuals.

12:08.240 --> 12:16.550
The difference between this mailbox type and the regular user mailbox is that the shared mailbox is

12:16.550 --> 12:20.350
a typical disabled to active directory object.

12:20.420 --> 12:30.050
Therefore no one can use this username to log on interactively with these mailboxes are simply created

12:30.050 --> 12:33.470
by using the following command Latin parameters.

12:33.570 --> 12:38.480
New mailbox name and share parameter.

12:38.480 --> 12:42.950
This example shows you how to create this shared mailbox.

12:42.950 --> 12:50.850
The only difference between the shared mailbox and a regular mailbox is the addition of the parameter

12:50.850 --> 12:58.040
of Sherratt into the command left some words about certain active directory attributes some are in the

12:58.040 --> 13:06.350
active directory attributes that you might want to set when creating a mailbox might not be a whaleboat

13:06.360 --> 13:09.190
using the new mailbox command left.

13:09.350 --> 13:18.550
Good examples of this are a user a city state company and department attributes in order to serve these

13:18.560 --> 13:19.400
attributes.

13:19.490 --> 13:26.180
You'll need to call the set user command left after the mailbox has been created.

13:26.180 --> 13:28.300
Please take a look at this example.

13:28.430 --> 13:33.140
And of course you can always Thuram get help set user.

13:33.140 --> 13:39.480
There's detailed to view all the whaleboat parameter supported by this command left.

13:39.560 --> 13:47.140
So to set these attributes you could run the following code search to user identity Dave office.

13:47.190 --> 13:55.550
I t see to settle a state is Washington and police know that they come and let's say that user is an

13:55.550 --> 13:59.780
active directory command left and not an exchange Come on let.
