There are several recipient types in exchange 2016 and each one of them can support multiple email addresses
of course a typical user mailbox recipient type is probably the first that comes to mind.
But we also have distribution groups contacts and public folders.
Each one can have one or more email addresses.
The syntax used for reading and remote and e-mail addresses to each of these recipient types is essentially
identical.
The only thing that changes is the.
Glad that is used to send their dresses and this reader you'll learn how to add and remove an e-mail
address from an exchange recipient.
Now to add a secondary e-mail address to a mailbox use the following commands Centrex said mailbox.
Dave email addresses and hash table for add or remove an e-mail address.
In this case will add Dave at West dot com dot com.
You can also add multiple e-mail addresses using the following technique said mailbox Dave.
E-mail addresses and multiple email addresses with AD key which will be equal in two day fat ist the
fat West and Dave carp dot com Tarsa dot com.
Email address it says can also be removed using the following syntax.
Set mailbox.
Dave.
Email Addresses hash table remove the Dave at West can toss a dot com for example just as we are able
to add multiple email addresses at once.
We can do the same one remove in an address we can do it with the following.
Take any cert mailbox.
Dave has a parameter email addresses and hash table for it.
Remove key which will be equal and Dave felt it can't toss a dot com and Dave dot the Dave and Gore
dot com dot com add in and remove an email addresses.
What's more challenging.
Back in the day so the Exchange 2007 to do this English management shell was required and led to your
work directly with the email addresses collection which is a multi well-healed property.
In order to modify the collection you first had to save the object to a variable modify it and then
write it back to the e-mail address is Sobchak on the recipient.
This made it impossible to update the email addresses for a recipient with one command the set.
On Let's use to manage recipients in exchange 2016.
Now support a new syntax that allows us to use a hash table to remove the email addresses property as
you can see from the code samples.
We can simply use the add and remove keys within the hash table and this scienter mail address.
Well use will either be added or removed as required.
This is a nice change that makes it easier to do this in scripts and especially when working interactively
in the shell.
The add and remove keys are interchangeable with the plus and minus characters that surface.
LSS.
Please take a look at the following example.
Search mailbox Dave.
Email addresses and the hash table which email addresses to add and which you addresses to remove.
And this example we've added and removed email addresses from the mailbox.
Note that the plus and minus keywords need to be enclosed in quotes so that PowerShares does not try
to interpret them.
And the plus and minus operators the syntax works with all the search command lets that support the
email addresses parameter.
Let me type them for you for example set Desch class mail box set the distribution group set dynamic
distribution group set mailbox set.
Mail contact Surt mail public folder Surt mail user and set remote mailbox.
Keep in mind that in most cases the best way to add an email address to a recipient is through the use
of an email address pool with it.
This may not always be an option by should be used first.
If you find yourself in a situation where a dress is made to be added to a large number of recipients
with that said that it is possible to do this in bulk using a simple foreach loop.
Let me type the following example for Rich.
I get mailbox in organizational unit sales set mailbox.
I have his email address is property which contains a hash table in which we are read in Alias property
to I and existing l s and vast that can also dot com.
This code simply iterates over each mailbox in the sale so you and adds a secondary email address using
their existing alias.
At West dot com Tulsa dot com.
You can use this technique and modify the syntax as needed to perform bulk operations.