Applies to: Exchange Server 2016

This cmdlet is available or effective only on Edge Transport servers in on-premises Exchange Server 2016.

Use the Set-AddressRewriteEntry cmdlet to modify an existing address rewrite entry that rewrites sender and recipient email addresses in messages sent to or sent from your organization through an Edge Transport server.

Set-Addressrewriteentry -Identity <AddressRewriteEntryIdParameter> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-ExceptionList <MultiValuedProperty>] [-ExternalAddress <String>] [-InternalAddress <String>] [-Name <String>] [-OutboundOnly <$true | $false>] [-WhatIf [<SwitchParameter>]]

This example modifies the existing address rewrite entry named "Address rewrite entry for" with the following settings:

  • Changes the original email addresses that are affected by the address rewrite entry to all addresses in the domain.

  • Changes the Name value to "Address rewrite entry for".

Set-AddressRewriteEntry "Address rewrite entry for" -Name "Address rewrite entry for" -InternalAddress

This example changes the existing address rewrite entry named "Address entry for all email addresses" from inbound and outbound to outbound only. You need to configure a proxy address that matches the rewritten email address for all affected recipients.

Set-AddressRewriteEntry "Address rewrite entry for all email addresses" -OutboundOnly $true

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Address Rewriting - Edge Transport" entry in the Mail flow permissions topic.


Parameter Required Type Description




The Identity parameter specifies the address rewrite entry you want to modify. You can specify the name or GUID of the address rewrite entry.




The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.

  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.




The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example,

The DomainController parameter isn't supported on Edge Transport servers. An Edge Transport server uses the local instance of Active Directory Lightweight Directory Services (AD LDS) to read and write data.




The ExceptionList parameter specifies the domain names that should be excluded from address rewriting when the InternalAddress parameter contains a value that specifies multiple domain names. You can separate multiple domain names included with the ExceptionList parameter with commas. For more information about how to add values to or remove values from multivalued properties, see Modifying multivalued properties.




The ExternalAddress parameter specifies the final email addresses that you want. If the InternalAddress parameter specifies a single email address (, the ExternalAddress parameter must also specify a single email address ( If the InternalAddress parameter specifies a single domain ( or a domain and all subdomains (*, the ExternalAddress parameter must specify a single domain (

You can't use the wildcard character (*) with the ExternalAddress parameter.




The InternalAddress parameter specifies the original email addresses that you want to change. You can use the following values:

  • Single email address

  • Single domain or

  • Domain and all subdomains   *




The Name parameter specifies a unique name for this address rewrite entry.




The OutboundOnly parameter enables or disables outbound-only address rewriting. Valid input for this parameter is $true or $false. The value $true means address rewriting occurs in outbound mail only. The value $false means address rewriting occurs on outbound mail and also on inbound mail (rewritten email addresses are changed back to the original email addresses in inbound mail). The default value is $false.

You must set this parameter to $true if the InternalAddress parameter contains the wildcard character to rewrite addresses in a domain and all subdomains (*
Also, when you configure outbound-only address rewriting, you need to configure the rewritten email address as a proxy address on the affected recipients. For example, if is rewritten to, the proxy address must be configured on Laura's mailbox. This allows replies and inbound messages to be delivered correctly.




The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.