Applies to: Exchange Online, Exchange Online Protection, Exchange Server 2016

Topic Last Modified: 2016-10-06

This cmdlet is available in on-premises Exchange Server 2016 and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.

Use the Get-TransportRule cmdlet to view transport rules (mail flow rules) in your organization.

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

Get-TransportRule [-Identity <RuleIdParameter>] [-DlpPolicy <String>] [-DomainController <Fqdn>] [-Filter <String>] [-ResultSize <Unlimited>] [-State <Enabled | Disabled>]

This example returns a summary list of all rules in your organization.


This example returns detailed information for the rule named "Ethical Wall - Sales and Brokerage Departments".

Get-TransportRule "Ethical Wall - Sales and Brokerage Departments" | 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.

This example returns a summary list of the rules that enforce the DLP policy named PII (U.S.) in your organization.

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

This example returns a summary list of all rules that enforce DLP policies in your organization.

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

On Mailbox servers, this cmdlet returns all rules in the Exchange organization that are stored in Active Directory. On an Edge Transport server, this cmdlet only returns rules that are configured on the local sever.

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.


Parameter Required Type Description




The DlpPolicy parameter filters the results by the named of the specified data loss prevention (DLP) policy. If the value contains spaces, enclose the value in quotation marks (").

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.




This parameter is available only in on-premises Exchange 2016.

The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example,

The DomainController parameter isn't supported on Edge Transport servers. An Edge Transport server uses the local instance of Active Directory Lightweight Directory Services (AD LDS) to read and write data.




The Filter parameter filters the results by using an OPath. This parameter searches the Description property, which includes the conditions, exceptions, actions and the associated values of a transport rule.

This parameter uses the syntax -Filter "Description -like '*<text>*'". For example, -Filter "Description -like **'".




The Identity parameter specifies the rule that you want to view. You can use any value that uniquely identifies the rule. For example:

  • Name

  • Distinguished name (DN)

  • GUID




The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.




The State parameter specifies filters the results by enabled or disabled rules. Valid values are:

  • Enabled   Only enabled rules are returned in the results.

  • Disabled   Only disabled rules are returned in the results.

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

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.

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.