Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-07

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

Syntax

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

Parameters

Parameter Required Type Description

ExternalAddress

Required

System.String

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

  • 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 InternalAddress by using the specified external domain name. For example, northwindtraders.com.

Note:
The asterisk character cannot be used with the ExternalAddress parameter.

InternalAddress

Required

System.String

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

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

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

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

Name

Required

System.String

This parameter enables the administrator to modify the unique name for this address rewrite entry.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the Active Directory directory service, include the DomainController parameter on the command. The DomainController parameter is not supported on Edge Transport servers. The Edge Transport server role writes only to the local ADAM instance.

ExceptionList

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies the domain names that should not 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.

OutboundOnly

Optional

System.Boolean

This parameter specifies whether e-mail addresses should be rewritten only when e-mail messages leave the Exchange 2007 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 cannot be set to $false if the value that is specified in InternalAddress contains a wildcard character.

TemplateInstance

Optional

System.Management.Automation.PSObject

When an existing object is supplied to this parameter, the command will use the configuration of that object to create an identical copy of the object on a local or target server.

Detailed Description

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

To run the New-AddressRewriteEntry cmdlet on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local Administrators group on that computer.

Input Types

Return Types

Errors

Error Description

 

Exceptions

Exceptions Description

 

Example

The following examples show three different scenarios:

  • Rewrite a single e-mail address. E-mail messages in both directions are rewritten.

  • Rewrite all e-mail addresses for the contoso.com domain. E-mail messages in both directions are rewritten.

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

Copy Code
New-AddressRewriteEntry -Name "Address rewrite entry for david@contoso.com" -InternalAddress david@contoso.com -ExternalAddress david@northwindtraders.com
New-AddressRewriteEntry -Name "Address rewrite entry for all contoso.com e-mail addresses" -InternalAddress contoso.com -ExternalAddress northwindtraders.com
New-AddressRewriteEntry -Name "Address rewrite entry for all contoso.com and subdomain e-mail addresses" -InternalAddress *.contoso.com -ExternalAddress northwindtraders.com -OutboundOnly:$true