Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Overview of this book

Table of Contents (22 chapters)
Microsoft Exchange 2010 PowerShell Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding and removing recipient e-mail addresses


There are several recipient types in Exchange 2010 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 for adding and removing 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...

  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='[email protected]',
      '[email protected]',
      '[email protected]'
    }
  3. E...