Share via


How to Duplicate the Transport Rule Configuration on Edge Transport Servers

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, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

This topic explains how to use the Exchange Management Shell to duplicate the configuration of transport rules from one computer that has the Edge Transport server role installed to another Edge Transport server.

For more information about transport rules, see Overview of Transport Rules.

Before You Begin

When you deploy new Edge Transport servers, we recommend that you use a cloned configuration to duplicate the Microsoft Exchange Server 2007 configuration of the source Edge Transport server to the target Edge Transport servers. This configuration includes the configuration of transport rules.

For more information about how to clone Edge Transport servers, see Using Edge Transport Server Cloned Configuration.

To perform the following procedures 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.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.

Procedure

You can use the procedures in this topic to duplicate only the transport rule configuration from the source Edge Transport server to target Edge Transport servers if either of the following conditions is true:

  • You have existing Edge Transport servers that have unique configurations that you don't want to overwrite by using the cloned configuration option mentioned earlier.

  • You want to deploy new Edge Transport servers that have unique configurations.

If you want to duplicate the transport rule configuration on more than one target Edge Transport server, you must import the transport rule configuration on each Edge Transport server.

Important

If you want to maintain the existing transport rule configuration on all your Edge Transport servers, you must repeat these procedures every time that you make a change to the transport rule configuration of an Edge Transport server.
If you expect frequent changes to the transport rule configuration on Edge Transport servers, we recommend that you designate one Edge Transport server as a source server and perform modifications on that server. Configure the other Edge Transport servers to automatically update their transport rule configuration from the source Edge Transport server by using an Exchange Management Shell script that performs the procedures later in this topic. The Exchange Management Shell script must contain the same commands that you would run manually.
For more information about how to run scripts in the Exchange Management Shell, see Scripting with the Exchange Management Shell.

For more information about how transport rules are applied in an Exchange 2007 organization, see Understanding How Transport Rules Are Applied in an Exchange 2007 Organization.

To duplicate transport rules from a source Edge Transport server to target Edge Transport servers, do the following:

  • Back up the existing transport rule configuration on the target Edge Transport servers.

  • Export the transport rule configuration on the source Edge Transport server to an XML file.

  • Import the transport rule configuration on the target Edge Transport servers.

Backing Up the Existing Transport Rule Configuration

Before you import a new transport rule configuration on a target Edge Transport server, you must back up the existing transport rule configuration by using the Export-TransportRuleCollection cmdlet. When you back up the transport rule configuration for a target Edge Transport server, an XML file is created that contains all the transport rules that are configured on that server. Later, if you have to restore the transport rule configuration that was saved by using this procedure, you can use the procedure that is described in the "Import the Transport Rule Configuration on Target Edge Transport Servers" procedure later in this topic.

Use the following syntax when you run the Export-TransportRuleCollection:

Export-TransportRuleCollection -FileName <file or UNC path and filename of XML output file>

We recommend that you name your transport rule configuration XML files after the servers on which they are created. You can save the XML file to a local directory on the Edge Transport server. Or you can save the XML file to a UNC network path. The server specified in the UNC network path doesn't have to be an Exchange 2007 server. Repeat this procedure on each Edge Transport server that you want to back up.

To use the Exchange Management Shell to back up the transport rule configuration on a server named EDGE02 to a local directory

  • Run the following command:

    Export-TransportRuleCollection C:\Backups\EDGE02.XML
    

To use the Exchange Management Shell to back up the transport rule configuration on a server named EDGE02 to a central backup server

  • Run the following command:

    Export-TransportRuleCollection \\CorpBackups\TransportRuleBackups\EDGE02.XML
    

Exporting the Transport Rule Configuration on a Source Edge Transport Server

The procedure to export the transport rule configuration from a source Edge Transport server resembles the procedure to back up the transport rule configuration on a target Edge Transport server. You must use the Export-TransportRuleCollection cmdlet to save the transport rule configuration to an XML file. However, you perform this procedure only on the source Edge Transport server. Then use the procedure that is described in the "Import the Transport Rule Configuration on Target Edge Transport Servers" procedure later in this topic to import the source transport rule configuration on the target Edge Transport servers.

Use the following syntax when you run the Export-TransportRuleCollection cmdlet:

Export-TransportRuleCollection -FileName <file or UNC path and filename of XML output file>

We recommend that you name your transport rule configuration XML file after the server on which it is created. You can save the transport rule configuration XML file to a local directory on the Edge Transport server. Or you can save the XML file to a UNC network path. The server specified in the UNC network path doesn't have to be an Exchange 2007 server.

To use the Exchange Management Shell to export the transport rule configuration to an XML file in a local directory on a source server named EDGE01

  • Run the following command:

    Export-TransportRuleCollection C:\Configuration\EDGE01.XML
    

To use the Exchange Management Shell to export the transport rule configuration on a server named EDGE01 to an XML file on a network path

  • Run the following command:

    Export-TransportRuleCollection \\Server\Files\EDGE01.XML
    

Importing the Transport Rule Configuration on Target Edge Transport Servers

The procedure to import the transport rule configuration to an Edge Transport server by using the Import-TransportRuleCollection cmdlet requires that you have a valid transport rule configuration XML file that was generated by running the Export-TransportRuleCollection cmdlet on a source Edge Transport server. For more information, see the "Exporting the Transport Rule Configuration on a Source Edge Transport Server" section earlier in this topic.

When you import a transport rule configuration XML file on an Edge Transport server, you overwrite any existing transport rule configuration on that server. The transport rule configuration stored in the XML file is read by the Import-TransportRuleCollection cmdlet. The cmdlet then duplicates the configuration exactly on the target Edge Transport server.

The source server role and target server role must be the same role. For example, you cannot import the transport rule configuration from an Edge Transport server on to a Hub Transport server.

Warning

The procedures in this section overwrite the existing transport rule configuration on target Edge Transport servers. Make sure that you back up the transport rule configuration on the target Edge Transport servers before you import the new transport rule configuration. For more information, see the "Backing Up the Existing Transport Rule Configuration" section earlier in this topic.

Warning

While the procedures in this section were designed for use with Edge Transport servers, they also work on computers that have the Hub Transport server role installed. However, when you import a transport rule configuration into a Hub Transport server by using the procedures in this section, the transport rule configuration for the whole organization is overwritten, except for the transport rule configuration of the Edge Transport servers. We recommend that you back up your transport rule configuration before you overwrite the transport rule configuration on all the Hub Transport servers.

Use the following syntax when you run the Import-TransportRuleCollection cmdlet:

Import-TransportRuleCollection -FileName <file or UNC path and filename of XML file to import>

You can copy the transport rule configuration XML file to the target Edge Transport server. Or you can point to a copy of the XML file that is located on a network path. Repeat this procedure on each Edge Transport server that you want to duplicate the transport rule configuration.

Important

The import of a transport rule configuration XML file that has been manually modified is not supported.

To use the Exchange Management Shell to import the transport rule configuration from an XML file located in a local directory on a target Edge Transport server

  1. Copy the transport rule configuration XML file to the local computer.

  2. Run the following command:

    Import-TransportRuleCollection C:\Configuration\EDGE01.XML
    

To use the Exchange Management Shell to import the transport rule configuration to an Edge Transport server named EDGE01 from an XML file located on a network path

  • Run the following command:

    Import-TransportRuleCollection \\Server\Files\EDGE01.XML
    

For More Information

For more information about the cmdlets that are used in this topic, see the following topics: