[This topic is in progress.]

Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2011-06-15

Use the New-AddressRewriteEntry cmdlet to create an address rewrite entry that rewrites sender and recipient e-mail addresses in e-mail messages sent to or from an Exchange organization.

Syntax

new-AddressRewriteEntry -Name <String> -ExternalAddress <String> -InternalAddress <String> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-ExceptionList <MultiValuedProperty>] [-OutboundOnly <$true | $false>] [-WhatIf [<SwitchParameter>]]

Detailed Description

With address rewriting in Microsoft Exchange Server 2010, you can modify the addresses of senders and recipients on messages that enter or leave an Exchange 2010 organization. You configure Address Rewriting agents on the Receive connector and Send connector on a computer that has the Edge Transport server role installed.

Note:
You can only modify the e-mail message addresses of senders and recipients with a single replacement e-mail address. You can't modify their e-mail address to use multiple replacement e-mail addresses.

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 agent" entry in the Transport Permissions topic.

Parameters

Parameter Required Type Description

Name

Required

System.String

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

ExternalAddress

Required

System.String

The ExternalAddress parameter specifies the external e-mail address or domain name used when you rewrite an internal e-mail address or domain name. If an e-mail address is specified in the InternalAddress parameter, the value specified in the ExternalAddress parameter must also be an e-mail address. If a domain name or domain name with a wildcard character is specified in the InternalAddress parameter, a domain name must be specified in the ExternalAddress parameter. Addresses or domain names can be entered in the following formats:

  • Single e-mail address   Rewrite a single internal e-mail address by using the specified address, for example, david@northwindtraders.com.

  • Domain name   Rewrite all internal e-mail addresses included in the InternalAddress parameter by using the specified external domain name, for example, northwindtraders.com.

Note:
The asterisk character (*) can't be used with the ExternalAddress parameter.

InternalAddress

Required

System.String

The InternalAddress parameter specifies the internal e-mail address or domain name to be rewritten. Addresses or domain names can be entered in the following formats:

  • Single e-mail address   Rewrite only the specified address, for example, david@contoso.com.

  • Domain name   Rewrite all e-mail addresses associated with the specified domain name, for example, contoso.com.

  • Domain name with asterisk   Rewrite all e-mail addresses associated with the specified domain name and all subdomains, for example, *.contoso.com.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory. The DomainController parameter isn't supported on the Edge Transport server role. The Edge Transport server role writes only to the Active Directory Lightweight Directory Services (AD LDS) instance.

ExceptionList

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ExceptionList parameter specifies the domain names that shouldn't be rewritten when the InternalAddress parameter contains a value that specifies multiple domain names. You can separate multiple domain names that are 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.

OutboundOnly

Optional

System.Boolean

The OutboundOnly parameter specifies whether e-mail addresses should be rewritten only when e-mail messages leave the Exchange 2010 organization, or if addresses should be rewritten when messages are sent in both directions. The two possible values for this parameter are $true or $false. The default value is $false.

Note:
This parameter can't be set to $false if the value specified in the InternalAddress parameter contains a wildcard character.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

Input Types

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.

Return Types

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.

Examples

EXAMPLE 1

This example creates an address rewrite entry for the e-mail address david@contoso.com. The address is rewritten for e-mail messages in both directions.

Copy Code
New-AddressRewriteEntry -Name "Address rewrite entry for david@contoso.com" -InternalAddress david@contoso.com -ExternalAddress david@northwindtraders.com

EXAMPLE 2

This example creates an address rewrite entry for the contoso.com domain. All e-mail addresses in both directions are rewritten.

Copy Code
New-AddressRewriteEntry -Name "Address rewrite entry for all contoso.com e-mail addresses" -InternalAddress contoso.com -ExternalAddress northwindtraders.com

EXAMPLE 3

This example creates an address rewrite entry with the following configuration:

  • All e-mail addresses for the contoso.com domain and all subdomains, except research.contoso.com and corp.contoso.com, are rewritten.

  • Only outbound e-mail messages are rewritten.

Copy Code
New-AddressRewriteEntry -Name "Address rewrite entry for all contoso.com and subdomain e-mail addresses" -InternalAddress *.contoso.com -ExternalAddress northwindtraders.com -ExceptionList research.contoso.com,corp.contoso.com -OutboundOnly $true