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

Topic Last Modified: 2012-07-23

You can use the Shell to view or modify an existing address rewrite entry on a computer that has the Microsoft Exchange Server 2010 Edge Transport server role installed.For more information about address rewriting, see Understanding Address Rewriting.

Looking for other management tasks related to transport agents? Check out Managing Transport Agents.

Caution:
Be careful when you modify an address rewrite entry. Any changes that you make are applied immediately when the command is run. We recommend that you first run the command with the WhatIf parameter.

For more information about the WhatIf parameter, see WhatIf, Confirm, and ValidateOnly Switches.

Prerequisites

Use the Shell to view a summary list of all address rewrite entries

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Address Rewriting agent" entry in the Transport Permissions topic.

Note:
You can't use the EMC to view a summary list of all address rewrite entries.

This example provides a summary list of all address rewrite entries.

Copy Code
Get-AddressRewriteEntry

For detailed syntax and parameter information, see Get-AddressRewriteEntry.

Use the Shell to view detailed configuration of a single address rewrite entry

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Address Rewriting agent" entry in the Transport Permissions topic.

Note:
You can't use the EMC to view detailed configuration of a single address rewrite entry.

To view detailed configuration of an address rewrite entry, you must pipe the output of the Get-AddressRewriteEntry command to the Format-List command by using the following command syntax.

Copy Code
Get-AddressRewriteEntry <GUID or address rewrite entry name> | Format-List

For more information about pipelining, see Pipelining. For more information about how to work with the information returned by a command, see Working with Command Output.

This example provides detailed configuration of the Rewrite Contoso.com to Northwindtraders.com address rewrite entry.

Copy Code
Get-AddressRewriteEntry "Rewrite Contoso.com to Northwindtraders.com" | Format-List

For detailed syntax and parameter information, see Get-AddressRewriteEntry.

Use the Shell to modify an address rewrite entry

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Address Rewriting agent" entry in the Transport Permissions topic.

Note:
You can't use the EMC to modify an address rewrite entry.

To modify an address rewrite entry, you must provide the Identity parameter of the address rewrite entry that you want to modify. You typically use the name of the address rewrite entry as its identity, although you can use its GUID.

You can modify several parameters configured on an address rewrite entry. To modify an address rewrite entry, specify the identity of the entry in double quotation marks. You don't have to specify the Identity parameter label because it's implied. Also, you should include each parameter that you want to modify, together with its value.

To modify an address rewrite entry, use the following syntax.

Copy Code
Set-AddressRewriteEntry <Identity> -Parameter <value>

This example modifies the ExternalAddress parameter.

Important:
On a single address rewrite entry, the ExternalAddress parameter and the InternalAddress parameter both must either be an e-mail address or a domain. You can't mix the two types of values on a single address rewrite entry.
Copy Code
Set-AddressRewriteEntry "Contoso to Northwindtraders" -ExternalAddress northwindtraders.net

This example modifies the InternalAddress parameter.

Copy Code
Set-AddressRewriteEntry "Northwindtraders to Contoso" -InternalAddress northwindtraders.net

This example modifies the OutboundOnly parameter.

Important:
You must use the OutboundOnly parameter when you configure address rewrite entries to rewrite multiple internal subdomains to a single external domain. If the OutboundOnly parameter is enabled on an address rewrite entry, Exchange 2010 doesn't rewrite inbound e-mail messages sent to the rewritten external domain that you specified.
Copy Code
Set-AddressRewriteEntry "Contoso to Northwindtraders" -OutboundOnly:$true

This example modifies the ExceptionList parameter.

Copy Code
Set-AddressRewriteEntry "Contoso to Northwindtraders" -ExceptionList sales.northwindtraders.net
Note:
If the ExceptionList property that the ExceptionList parameter modifies contains multiple values, be sure that you don't overwrite existing values when you add subdomains. For more information about how to add values to, and remove values from, the ExceptionList property, see Modifying Multivalued Properties.

This example modifies the Name parameter.

Copy Code
Set-AddressRewriteEntry "Contoso to Northwindtraders" -Name "Contoso to Woodgrove Bank"

For detailed syntax and parameter information, see Set-AddressRewriteEntry.