Commands › Exchange Online

Get-TransportRule

Exchange Online ExchangeOnlineManagement Get-*

View transport rules (mail flow rules) in your organization.

Quick start script

# Get-TransportRule — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-TransportRule | Format-List

# 3. Export for evidence / drift tracking
Get-TransportRule | Export-Clixml .\TransportRule-$(Get-Date -Format yyyyMMdd).xml

Syntax

Get-TransportRule [[-Identity] <RuleIdParameter>]
 [-DomainController <Fqdn>]
 [-State <RuleState>]
 [-DlpPolicy <String>]
 [-ExcludeConditionActionDetails <Boolean>]
 [-Filter <String>]
 [-ResultSize <Unlimited>]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Identity RuleIdParameter The Identity parameter specifies the rule that you want to view. You can use any value that uniquely identifies the rule. For example:
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-State RuleState The State parameter specifies filters the results by enabled or disabled rules. Valid values are:
-DlpPolicy String **Note**: This parameter is functional only in on-premises Exchange.
-ExcludeConditionActionDetails Boolean This parameter is available only in the cloud-based service.
-Filter String 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.
-ResultSize Unlimited 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.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.