Commands › Exchange Online

Export-TransportRuleCollection

Exchange Online ExchangeOnlineManagement Export-*

Export the transport rules in your organization.

Quick start script

# Export-TransportRuleCollection — 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
Export-TransportRuleCollection | Format-List

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

Syntax

Export-TransportRuleCollection [[-Identity] <RuleIdParameter>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-Format <RuleCollectionFormat>]
 [-ExportLegacyRules]
 [-WhatIf]
 [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-Identity RuleIdParameter This parameter is functional only in Exchange Server 2010.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-ExportLegacyRules SwitchParameter The ExportLegacyRules switch is required to export transport rules from Exchange 2007. You don't need to specify a value with this switch.
-Format RuleCollectionFormat This parameter is available only in the cloud-based service.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

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