Applies to: Exchange Server 2013, Exchange Online

Topic Last Modified: 2012-10-16

Use the Get-TransportRule cmdlet to view transport rules configured in your organization.

For information about the parameter sets in the Syntax section below, see Syntax.

Syntax

Get-TransportRule [-Identity <RuleIdParameter>] [-DlpPolicy <String>] [-DomainController <Fqdn>] [-Organization <OrganizationIdParameter>] [-State <Enabled | Disabled>]

Examples

EXAMPLE 1

This example returns all transport rules configured in your organization.

Copy Code
Get-TransportRule

EXAMPLE 2

This example returns only the rule that matches the name "Block email 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 email 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.

EXAMPLE 3

This example returns the rules that are used to enforce the DLP policy PII (U.S.) in your organization.

Copy Code
Get-TransportRule -DlpPolicy "PII (U.S.)"

EXAMPLE 4

This example returns all rules in your organization that are used to enforce DLP policies in your organization. The command output is filtered to display only those rules that have a value for their DlpPolicy attribute.

Copy Code
Get-TransportRule | Where {$_.DlpPolicy -ne $null}

Detailed Description

The Get-TransportRule cmdlet lets you view the configuration of transport rules that are defined in your organization.

For information about how to configure transport rules in your organization, see Set-TransportRule. To learn more about transport rules, see 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

DlpPolicy

Optional

System.String

The DlpPolicy parameter specifies the data loss prevention (DLP) policy when you want to view the rules associated with a specific DLP policy. DLP policies in your organization allow you to prevent unintentional disclosure of sensitive information. Each DLP policy is enforced using a set of transport rules. If you want to view the rules that are used to support a specific DLP policy, use this parameter to specify the name of that policy.

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.

Identity

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.RuleIdParameter

The Identity parameter specifies the transport rule you want to view. Enter either the name or GUID of the rule. You can omit this parameter label.

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

The Organization parameter is reserved for internal Microsoft use.

State

Optional

Microsoft.Exchange.MessagingPolicies.Rules.RuleState

The State parameter specifies whether to return only the rules that are enabled or the ones that are disabled. The following values are valid for this parameter:

  • Enabled   The command returns only the rules that are currently enabled.

  • Disabled   The command returns only the rules that are currently disabled.

If you don't use this parameter, the command returns all rules, both enabled and disabled.

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.