Share via


Set-AddressRewriteEntry (RTM)

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007

Use the Set-AddressRewriteEntry cmdlet to modify an existing address rewrite entry that rewrites sender and recipient e-mail addresses within e-mail messages that are sent to and from an e-mail organization.

Syntax

set-addressrewriteentry -Identity <AddressRewriteEntryIdParameter> [-DomainController <Fqdn>] [-ExceptionList <MultiValuedProperty>] [-ExternalAddress <String>] [-InternalAddress <String>] [-Name <String>] [-OutboundOnly <$true | $false>]

set-addressrewriteentry [-DomainController <Fqdn>] [-ExceptionList <MultiValuedProperty>] [-ExternalAddress <String>] [-Instance <AddressRewriteEntry>] [-InternalAddress <String>] [-Name <String>] [-OutboundOnly <$true | $false>]

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 Set-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.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Management.MessagingPolicies.AddressRewrite.AddressRewriteEntryIdParameter

This parameter specifies the address rewrite entry to be modified. The Identity parameter will accept a GUID, or the unique address rewrite name.

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.

ExternalAddress

Optional

System.String

This parameter enables the administrator to modify the external e-mail address or domain name that is used when rewriting an internal e-mail address or domain name. If an e-mail address is specified in InternalAddress, the value 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 using the specified address. For example, david@northwindtraders.com.

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

Note

The asterisk character cannot be used with the ExternalAddress parameter.

Instance

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.AddressRewriteEntry

The Instance parameter enables you to pass an entire object to the command to be processed. It is mainly used in scripts where an entire object must be passed to the command.

InternalAddress

Optional

System.String

This parameter enables the administrator to modify the internal e-mail address or domain name that is being 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 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.

Name

Optional

System.String

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

OutboundOnly

Optional

System.Boolean

This parameter enables the administrator to modify whether e-mail addresses should be rewritten only when e-mail messages leave the Exchange Server 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 specified in InternalAddress contains a wildcard character.

Input Types

Return Types

Errors

Error Description

 

Exceptions

Exceptions Description

 

Example

The following examples show how to modify an existing address rewrite entry. The first example sets the internal domain name to be written. The descriptive name for this entry is also changed to reflect the new domain name to be rewritten.

The second example sets the OutboundOnly parameter to $true. This action tells the Address Rewriting agent to rewrite addresses only on outbound e-mail messages from the Exchange 2007 organization.

Important

Internal senders who are affected by an address rewrite entry that has the OutboundOnly parameter set to $true must have a configured proxy address that matches the rewritten e-mail address.

Set-AddressRewriteEntry "Address rewrite entry for contoso.com" -Name "Address rewrite entry for northwindtraders.com" -InternalAddress northwindtraders.com 
Set-AddressRewriteEntry "Address rewrite entry for all contoso.com e-mail addresses" -OutboundOnly:$true