Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Overview of this book

Table of Contents (21 chapters)
Microsoft Exchange Server PowerShell Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Adding and removing recipient e-mail addresses


There are several recipient types in Exchange 2013, and each one of them can support multiple e-mail addresses. Of course, the typical user mailbox recipient type is probably the first that comes to mind, but we also have distribution groups, contacts, and public folders, each of which can have one or more e-mail addresses. The syntax used to add and remove e-mail addresses to each of these recipient types is essentially identical; the only thing that changes is the cmdlet that is used to set the address. In this recipe, you'll learn how to add or remove an e-mail address from an Exchange recipient.

How to do it...

Let's see how to add and remove recipient e-mail addresses using the following steps:

  1. To add a secondary e-mail address to a mailbox, use the following command syntax:

    Set-Mailbox dave -EmailAddresses @{add='[email protected]'}
    
  2. Multiple addresses can also be added using this technique:

    Set-Mailbox dave -EmailAddresses @{
      add='dave...