WEBVTT

00:04.490 --> 00:12.820
There are several recipient types in exchange 2016 and each one of them can support multiple email addresses

00:13.030 --> 00:20.260
of course a typical user mailbox recipient type is probably the first that comes to mind.

00:20.290 --> 00:25.240
But we also have distribution groups contacts and public folders.

00:25.270 --> 00:29.350
Each one can have one or more email addresses.

00:29.440 --> 00:36.760
The syntax used for reading and remote and e-mail addresses to each of these recipient types is essentially

00:36.760 --> 00:37.950
identical.

00:37.960 --> 00:41.520
The only thing that changes is the.

00:41.640 --> 00:48.910
Glad that is used to send their dresses and this reader you'll learn how to add and remove an e-mail

00:48.910 --> 00:52.370
address from an exchange recipient.

00:52.540 --> 00:59.740
Now to add a secondary e-mail address to a mailbox use the following commands Centrex said mailbox.

00:59.740 --> 01:06.240
Dave email addresses and hash table for add or remove an e-mail address.

01:06.240 --> 01:12.070
In this case will add Dave at West dot com dot com.

01:12.070 --> 01:19.620
You can also add multiple e-mail addresses using the following technique said mailbox Dave.

01:19.780 --> 01:29.260
E-mail addresses and multiple email addresses with AD key which will be equal in two day fat ist the

01:29.270 --> 01:33.650
fat West and Dave carp dot com Tarsa dot com.

01:33.670 --> 01:38.480
Email address it says can also be removed using the following syntax.

01:38.620 --> 01:39.750
Set mailbox.

01:39.760 --> 01:40.450
Dave.

01:40.500 --> 01:49.030
Email Addresses hash table remove the Dave at West can toss a dot com for example just as we are able

01:49.030 --> 01:52.100
to add multiple email addresses at once.

01:52.150 --> 01:57.350
We can do the same one remove in an address we can do it with the following.

01:57.370 --> 01:59.380
Take any cert mailbox.

01:59.380 --> 02:05.310
Dave has a parameter email addresses and hash table for it.

02:05.470 --> 02:15.550
Remove key which will be equal and Dave felt it can't toss a dot com and Dave dot the Dave and Gore

02:15.640 --> 02:21.390
dot com dot com add in and remove an email addresses.

02:21.400 --> 02:22.870
What's more challenging.

02:22.870 --> 02:31.480
Back in the day so the Exchange 2007 to do this English management shell was required and led to your

02:31.480 --> 02:38.350
work directly with the email addresses collection which is a multi well-healed property.

02:38.350 --> 02:46.630
In order to modify the collection you first had to save the object to a variable modify it and then

02:46.630 --> 02:51.220
write it back to the e-mail address is Sobchak on the recipient.

02:51.220 --> 02:59.450
This made it impossible to update the email addresses for a recipient with one command the set.

02:59.530 --> 03:04.940
On Let's use to manage recipients in exchange 2016.

03:04.990 --> 03:13.930
Now support a new syntax that allows us to use a hash table to remove the email addresses property as

03:13.930 --> 03:16.210
you can see from the code samples.

03:16.300 --> 03:23.370
We can simply use the add and remove keys within the hash table and this scienter mail address.

03:23.590 --> 03:28.070
Well use will either be added or removed as required.

03:28.210 --> 03:36.160
This is a nice change that makes it easier to do this in scripts and especially when working interactively

03:36.310 --> 03:37.220
in the shell.

03:37.330 --> 03:46.920
The add and remove keys are interchangeable with the plus and minus characters that surface.

03:46.980 --> 03:47.880
LSS.

03:47.920 --> 03:50.670
Please take a look at the following example.

03:50.700 --> 03:52.560
Search mailbox Dave.

03:52.700 --> 04:01.280
Email addresses and the hash table which email addresses to add and which you addresses to remove.

04:01.390 --> 04:06.540
And this example we've added and removed email addresses from the mailbox.

04:06.550 --> 04:15.130
Note that the plus and minus keywords need to be enclosed in quotes so that PowerShares does not try

04:15.130 --> 04:16.980
to interpret them.

04:17.110 --> 04:26.030
And the plus and minus operators the syntax works with all the search command lets that support the

04:26.290 --> 04:28.540
email addresses parameter.

04:28.560 --> 04:38.020
Let me type them for you for example set Desch class mail box set the distribution group set dynamic

04:38.020 --> 04:41.700
distribution group set mailbox set.

04:41.700 --> 04:50.860
Mail contact Surt mail public folder Surt mail user and set remote mailbox.

04:50.860 --> 04:59.560
Keep in mind that in most cases the best way to add an email address to a recipient is through the use

04:59.560 --> 05:01.600
of an email address pool with it.

05:01.690 --> 05:05.980
This may not always be an option by should be used first.

05:06.100 --> 05:14.020
If you find yourself in a situation where a dress is made to be added to a large number of recipients

05:14.200 --> 05:23.060
with that said that it is possible to do this in bulk using a simple foreach loop.

05:23.080 --> 05:26.900
Let me type the following example for Rich.

05:26.960 --> 05:33.530
I get mailbox in organizational unit sales set mailbox.

05:33.700 --> 05:42.280
I have his email address is property which contains a hash table in which we are read in Alias property

05:42.290 --> 05:48.970
to I and existing l s and vast that can also dot com.

05:48.970 --> 05:58.480
This code simply iterates over each mailbox in the sale so you and adds a secondary email address using

05:58.480 --> 06:00.400
their existing alias.

06:00.400 --> 06:03.830
At West dot com Tulsa dot com.

06:03.970 --> 06:10.260
You can use this technique and modify the syntax as needed to perform bulk operations.
