Sdílet prostřednictvím


Get-TransportRule

 

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Use the Get-TransportRule cmdlet view transport rules that are configured on a computer that has the Microsoft Exchange Server 2007 Hub Transport server role or the Edge Transport server role installed.

Syntax

Get-TransportRule [-Identity <RuleIdParameter>] [-DomainController <Fqdn>] [-State <Enabled | Disabled>]

Detailed Description

The Get-TransportRule cmdlet lets you view the configuration of transport rules that are defined on a Hub Transport server or an Edge Transport server. If you run this command on a Hub Transport server, all transport rules that are configured in the organization, except for rules that are configured on an Edge Transport server, will be displayed. If you run this command on an Edge Transport server, only the rules that are configured on the local Edge Transport server will be displayed.

For information about how to configure transport rules that run against e-mail messages in an Exchange 2007 organization, see Set-TransportRule.

For information about the Transport Rules agent, see Overview of Transport Rules.

To run the Get-TransportRule cmdlet, the account you use must be delegated the following:

  • Exchange View-Only Administrators role

To run the Get-TransportRule 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.

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

Parameters

Parameter Required Type Description

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory, include the DomainController parameter in the command. The DomainController parameter is not supported on computers that run the Edge Transport server role. The Edge Transport server role writes only to the local Active Directory Application Mode (ADAM) instance.

Identity

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.RuleIdParameter

Use this parameter to specify the transport rule to be viewed. Enter either the GUID or the Name of the rule. You can omit the Identity parameter label.

State

Optional

Microsoft.Exchange.MessagingPolicies.Rules.RuleState

Use this parameter to filter the results of the Get-TransportRule command. The following values are valid for this parameter:

  • Enabled   Instructs the command to return only the rules that are enabled and that are applied to e-mail messages if the conditions are met.

  • Disabled   Instructs the command to return only the rules that are disabled and that are not applied to e-mail messages.

Input Types

Return Types

Errors

Error Description

 

 

Exceptions

Exceptions Description

 

 

Example

The following examples show the syntax of the Get-TransportRule command. The first example returns only the rule that matches the name "Block e-mail messages between Sales and Brokerage Groups". The command is piped to the Format-List command to display the detailed configuration of the specified transport rule.

The second example returns a summary list of all transport rules that are configured in an Exchange organization if the command is run on a Hub Transport server, or the rules that are configured on the local computer if the command is run on an Edge Transport server.

For more information about Pipelining, see Pipelining.

For more information about how to work with the output of a command, see Working with Command Output.

Get-TransportRule "Block e-mail messages between Sales and Brokerage Groups" | Format-List
Get-TransportRule