Remove-EmailAddress cmdlet changes current primary address to another one. 

This cmdlet supports risk-mitigation parameters.

Input parameters

#
Parameter
Type

Mandatory (R/O)

Description
Restrictions/Valid Values
1 Authentication Information (all parameters)  
2

Address

(aliases: Address, EmailAddress, EmailAddresses)

string[] R The address (the list of addresses) to remove Address(es) must exist in the current list of Email addresses
3

Identity

(aliases: GUID, DistinguishedName)

ADObjectIDParameter
R

A property, that is used for managing addresses of mail-enabled Š¾bjects:

  • MS Exchange mailbox
  • OWA-only mailbox
  • POP/IMAP mailbox
  • Resource mailbox
  • MS Exchange distribution list
  • Public folder 

Value of one of these parameters can be used as Identity:

#ParameterDescription
1 GUID Globally Unique Identifier (ObjectGuid)
2 DistinguishedName Unique name of the object in Active Directory

Output parameters

No parameters

Examples of using Remove-EmailAddress cmdlet

Removing one address:

Remove-EmailAddress -Identity 36082eb0-1011-4f22-aa98-9139ddbd31b3 -EmailAddress "john.doe@accountname.hostpilot.com"

Removing several addresses:

Remove-EmailAddress -Identity 36082eb0-1011-4f22-aa98-9139ddbd31b3 -EmailAddresses "john.doe@accountname.hostpilot.com", "jdoe@accountname.hostpilot.com"