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

Topic Last Modified: 2012-11-19

Use the Get-TransportRule cmdlet to view transport rules configured on a Hub Transport or Edge Transport server.

Syntax

Get-TransportRule [-Identity <RuleIdParameter>] [-DomainController <Fqdn>] [-Organization <OrganizationIdParameter>] [-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 configured in the organization, except for rules configured on an Edge Transport server, are displayed. If you run this command on an Edge Transport server, only the rules configured on that Edge Transport server are displayed.

For information about how to configure transport rules in a Microsoft Exchange Server 2010 organization, see Set-TransportRule. For information about the Transport Rules agent, see Overview of Transport Rules.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Transport rules" entry in the Messaging Policy and Compliance Permissions topic.

Parameters

Parameter Required Type Description

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory. The DomainController parameter isn't supported on the Edge Transport server role. The Edge Transport server role reads only from the Active Directory Lightweight Directory Services (AD LDS) instance.

Identity

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.RuleIdParameter

The Identity parameter specifies the transport rule to be viewed. Enter either the GUID or the name of the rule. You can omit the parameter label.

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

This parameter is available for multi-tenant deployments. It isn't available for on-premises deployments. For more information about multi-tenant deployments, see Multi-Tenant Support.

The Organization parameter specifies the organization in which you'll perform this action. This parameter doesn't accept wildcard characters, and you must use the exact name of the organization.

State

Optional

Microsoft.Exchange.MessagingPolicies.Rules.RuleState

The State parameter specifies whether to filter the results of the Get-TransportRule cmdlet. The following values are valid for this parameter:

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

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

Input Types

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

Return Types

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

Examples

EXAMPLE 1

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

Copy Code
Get-TransportRule

EXAMPLE 2

This 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 cmdlet to display the detailed configuration of the specified transport rule.

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

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.