Commands › Exchange Online

Set-TransportRule

Exchange Online ExchangeOnlineManagement Set-*

Modify existing transport rules (mail flow rules) in your organization. **Note**: - The action of a rule without conditions or exceptions is applied to all messages, which could have unintended consequences. For example, if the rule action deletes messages, the rule without conditions or exceptions might delete all inbound and outbound messages for the entire organization. - Rules that use Active Directory or Microsoft Entra ID properties as conditions or exceptions work only on senders or recipients in the organization.

Quick start script

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

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-TransportRule
$before | Format-List

# 3. Make the change (dry run first)
Set-TransportRule -Identity <RuleIdParameter> -WhatIf
Set-TransportRule -Identity <RuleIdParameter>

# 4. Verify and diff
$after = Get-TransportRule
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-TransportRule [-Identity] <RuleIdParameter>
 [-ActivationDate <DateTime>]
 [-ADComparisonAttribute <ADAttribute>]
 [-ADComparisonOperator <Evaluation>]
 [-AddManagerAsRecipientType <AddedRecipientType>]
 [-AddToRecipients <RecipientIdParameter[]>]
 [-AnyOfCcHeader <RecipientIdParameter[]>]
 [-AnyOfCcHeaderMemberOf <RecipientIdParameter[]>]
 [-AnyOfRecipientAddressContainsWords <Word[]>]
 [-AnyOfRecipientAddressMatchesPatterns <Pattern[]>]
 [-AnyOfToCcHeader <RecipientIdParameter[]>]
 [-AnyOfToCcHeaderMemberOf <RecipientIdParameter[]>]
 [-AnyOfToHeader <RecipientIdParameter[]>]
 [-AnyOfToHeaderMemberOf <RecipientIdParameter[]>]
 [-ApplyClassification <String>]
 [-ApplyHtmlDisclaimerFallbackAction <DisclaimerFallbackAction>]
 [-ApplyHtmlDisclaimerLocation <DisclaimerLocation>]
 [-ApplyHtmlDisclaimerText <DisclaimerText>]
 [-ApplyOME <Boolean>]
 [-ApplyRightsProtectionCustomizationTemplate <OMEConfigurationIdParameter>]
 [-ApplyRightsProtectionTemplate <RmsTemplateIdParameter>]
 [-AttachmentContainsWords <Word[]>]
 [-AttachmentExtensionMatchesWords <Word[]>]
 [-AttachmentHasExecutableContent <Boolean>]
 [-AttachmentIsPasswordProtected <Boolean>]
 [-AttachmentIsUnsupported <Boolean>]
 [-AttachmentMatchesPatterns <Pattern[]>]
 [-AttachmentNameMatchesPatterns <Pattern[]>]
 [-AttachmentProcessingLimitExceeded <Boolean>]
 [-AttachmentPropertyContainsWords <Word[]>]
 [-AttachmentSizeOver <ByteQuantifiedSize>]
 [-BetweenMemberOf1 <RecipientIdParameter[]>]
 [-BetweenMemberOf2 <RecipientIdParameter[]>]
 [-BlindCopyTo <RecipientIdParameter[]>]
 [-Comments <String>]
 [-Confirm]
 [-ContentCharacterSetContainsWords <Word[]>]
 [-CopyTo <RecipientIdParameter[]>]
 [-DeleteMessage <Boolean>]
 [-Disconnect <Boolean>]
 [-DlpPolicy <String>]
 [-DomainController <Fqdn>]
 [-ExceptIfADComparisonAttribute <ADAttribute>]
 [-ExceptIfADComparisonOperator <Evaluation>]
 [-ExceptIfAnyOfCcHeader <RecipientIdParameter[]>]
 [-ExceptIfAnyOfCcHeaderMemberOf <RecipientIdParameter[]>]
 [-ExceptIfAnyOfRecipientAddressContainsWords <Word[]>]
 [-ExceptIfAnyOfRecipientAddressMatchesPatterns <Pattern[]>]
 [-ExceptIfAnyOfToCcHeader <RecipientIdParameter[]>]
 [-ExceptIfAnyOfToCcHeaderMemberOf <RecipientIdParameter[]>]
 [-ExceptIfAnyOfToHeader <RecipientIdParameter[]>]
 [-ExceptIfAnyOfToHeaderMemberOf <RecipientIdParameter[]>]
 [-ExceptIfAttachmentContainsWords <Word[]>]
 [-ExceptIfAttachmentExtensionMatchesWords <Word[]>]
 [-ExceptIfAttachmentHasExecutableContent <Boolean>]
 [-ExceptIfAttachmentIsPasswordProtected <Boolean>]
 [-ExceptIfAttachmentIsUnsupported <Boolean>]
 [-ExceptIfAttachmentMatchesPatterns <Pattern[]>]
 [-ExceptIfAttachmentNameMatchesPatterns <Pattern[]>]
 [-ExceptIfAttachmentProcessingLimitExceeded <Boolean>]
 [-ExceptIfAttachmentPropertyContainsWords <Word[]>]
 [-ExceptIfAttachmentSizeOver <ByteQuantifiedSize>]
 [-ExceptIfBetweenMemberOf1 <RecipientIdParameter[]>]
 [-ExceptIfBetweenMemberOf2 <RecipientIdParameter[]>]
 [-ExceptIfContentCharacterSetContainsWords <Word[]>]
 [-ExceptIfFrom <RecipientIdParameter[]>]
 [-ExceptIfFromAddressContainsWords <Word[]>]
 [-ExceptIfFromAddressMatchesPatterns <Pattern[]>]
 [-ExceptIfFromMemberOf <RecipientIdParameter[]>]
 [-ExceptIfFromScope <FromUserScope>]
 [-ExceptIfHasClassification <String>]
 [-ExceptIfHasNoClassification <Boolean>]
 [-ExceptIfHasSenderOverride <Boolean>]
 [-ExceptIfHeaderContainsMessageHeader <HeaderName>]
 [-ExceptIfHeaderContainsWords <Word[]>]
 [-ExceptIfHeaderMatchesMessageHeader <HeaderName>]
 [-ExceptIfHeaderMatchesPatterns <Pattern[]>]
 [-ExceptIfManagerAddresses <RecipientIdParameter[]>]
 [-ExceptIfManagerForEvaluatedUser <EvaluatedUser>]
 [-ExceptIfMessageContainsDataClassifications <Hashtable[]>]
 [-ExceptIfMessageSizeOver <ByteQuantifiedSize>]
 [-ExceptIfMessageTypeMatches <MessageType>]
 [-ExceptIfRecipientADAttributeContainsWords <Word[]>]
 [-ExceptIfRecipientADAttributeMatchesPatterns <Pattern[]>]
 [-ExceptIfRecipientAddressContainsWords <Word[]>]
 [-ExceptIfRecipientAddressMatchesPatterns <Pattern[]>]
 [-ExceptIfRecipientDomainIs <Word[]>]
 [-ExceptIfRecipientInSenderList <Word[]>]
 [-ExceptIfSCLOver <SclValue>]
 [-ExceptIfSenderADAttributeContainsWords <Word[]>]
 [-ExceptIfSenderADAttributeMatchesPatterns <Pattern[]>]
 [-ExceptIfSenderDomainIs <Word[]>]
 [-ExceptIfSenderInRecipientList <Word[]>]
 [-ExceptIfSenderIpRanges <MultiValuedProperty>]
 [-ExceptIfSenderManagementRelationship <ManagementRelationship>]
 [-ExceptIfSentTo <RecipientIdParameter[]>]
 [-ExceptIfSentToMemberOf <RecipientIdParameter[]>]
 [-ExceptIfSentToScope <ToUserScope>]
 [-ExceptIfSubjectContainsWords <Word[]>]
 [-ExceptIfSubjectMatchesPatterns <Pattern[]>]
 [-ExceptIfSubjectOrBodyContainsWords <Word[]>]
 [-ExceptIfSubjectOrBodyMatchesPatterns <Pattern[]>]
 [-ExceptIfWithImportance <Importance>]
 [-ExpiryDate <DateTime>]
 [-From <RecipientIdParameter[]>]
 [-FromAddressContainsWords <Word[]>]
 [-FromAddressMatchesPatterns <Pattern[]>]
 [-FromMemberOf <RecipientIdParameter[]>]
 [-FromScope <FromUserScope>]
 [-GenerateIncidentReport <RecipientIdParameter>]
 [-GenerateNotification <DisclaimerText>]
 [-HasClassification <String>]
 [-HasNoClassification <Boolean>]
 [-HasSenderOverride <Boolean>]
 [-HeaderContainsMessageHeader <HeaderName>]
 [-HeaderContainsWords <Word[]>]
 [-HeaderMatchesMessageHeader <HeaderName>]
 [-HeaderMatchesPatterns <Pattern[]>]
 [-IncidentReportContent <IncidentReportContent[]>]
 [-IncidentReportOriginalMail <IncidentReportOriginalMail>]
 [-LogEventText <EventLogText>]
 [-ManagerAddresses <RecipientIdParameter[]>]
 [-ManagerForEvaluatedUser <EvaluatedUser>]
 [-MessageContainsDataClassifications <Hashtable[]>]
 [-MessageSizeOver <ByteQuantifiedSize>]
 [-MessageTypeMatches <MessageType>]
 [-Mode <RuleMode>]
 [-ModerateMessageByManager <Boolean>]
 [-ModerateMessageByUser <RecipientIdParameter[]>]
 [-Name <String>]
 [-NotifySender <NotifySenderType>]
 [-PrependSubject <SubjectPrefix>]
 [-Priority <Int32>]
 [-Quarantine <Boolean>]
 [-RecipientADAttributeContainsWords <Word[]>]
 [-RecipientADAttributeMatchesPatterns <Pattern[]>]
 [-RecipientAddressContainsWords <Word[]>]
 [-RecipientAddressMatchesPatterns <Pattern[]>]
 [-RecipientAddressType <RecipientAddressType>]
 [-RecipientDomainIs <Word[]>]
 [-RecipientInSenderList <Word[]>]
 [-RedirectMessageTo <RecipientIdParameter[]>]
 [-RejectMessageEnhancedStatusCode <RejectEnhancedStatus>]
 [-RejectMessageReasonText <RejectText>]
 [-RemoveHeader <HeaderName>]
 [-RemoveOME <Boolean>]
 [-RemoveOMEv2 <Boolean>]
 [-RemoveRMSAttachmentEncryption <Boolean>]
 [-RouteMessageOutboundConnector <OutboundConnectorIdParameter>]
 [-RouteMessageOutboundRequireTls <Boolean>]
 [-RuleErrorAction <RuleErrorAction>]
 [-RuleSubType <RuleSubType>]
 [-SCLOver <SclValue>]
 [-SenderADAttributeContainsWords <Word[]>]
 [-SenderADAttributeMatchesPatterns <Pattern[]>]
 [-SenderAddressLocation <SenderAddressLocation>]
 [-SenderDomainIs <Word[]>]
 [-SenderInRecipientList <Word[]>]
 [-SenderIpRanges <MultiValuedProperty>]
 [-SenderManagementRelationship <ManagementRelationship>]
 [-SentTo <RecipientIdParameter[]>]
 [-SentToMemberOf <RecipientIdParameter[]>]
 [-SentToScope <ToUserScope>]
 [-SetAuditSeverity <String>]
 [-SetHeaderName <HeaderName>]
 [-SetHeaderValue <HeaderValue>]
 [-SetSCL <SclValue>]
 [-SmtpRejectMessageRejectStatusCode <RejectStatusCode>]
 [-SmtpRejectMessageRejectText <RejectText>]
 [-StopRuleProcessing <Boolean>]
 [-SubjectContainsWords <Word[]>]
 [-SubjectMatchesPatterns <Pattern[]>]
 [-SubjectOrBodyContainsWords <Word[]>]
 [-SubjectOrBodyMatchesPatterns <Pattern[]>]
 [-WhatIf]
 [-WithImportance <Importance>]
 [<CommonParameters>]

Parameters (176)

ParameterTypeRequiredWhat it controls
-Identity RuleIdParameter yes The Identity parameter specifies the rule that you want to modify. You can use any value that uniquely identifies the rule. For example:
-ActivationDate DateTime The ActivationDate parameter specifies when the rule starts processing messages. The rule doesn't take any action on messages until the specified date/time.
-ADComparisonAttribute ADAttribute This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-ADComparisonOperator Evaluation This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AddManagerAsRecipientType AddedRecipientType This parameter specifies an action or part of an action for the rule.
-AddToRecipients RecipientIdParameter[] This parameter specifies an action or part of an action for the rule.
-AnyOfCcHeader RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AnyOfCcHeaderMemberOf RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AnyOfRecipientAddressContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AnyOfRecipientAddressMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AnyOfToCcHeader RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AnyOfToCcHeaderMemberOf RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AnyOfToHeader RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AnyOfToHeaderMemberOf RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-ApplyClassification String This parameter specifies an action or part of an action for the rule.
-ApplyHtmlDisclaimerFallbackAction DisclaimerFallbackAction This parameter specifies an action or part of an action for the rule.
-ApplyHtmlDisclaimerLocation DisclaimerLocation This parameter specifies an action or part of an action for the rule.
-ApplyHtmlDisclaimerText DisclaimerText This parameter specifies an action or part of an action for the rule.
-ApplyOME Boolean This parameter is available only in the cloud-based service.
-ApplyRightsProtectionCustomizationTemplate OMEConfigurationIdParameter This parameter is available only in the cloud-based service.
-ApplyRightsProtectionTemplate RmsTemplateIdParameter This parameter specifies an action or part of an action for the rule.
-AttachmentContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentExtensionMatchesWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentHasExecutableContent Boolean This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentIsPasswordProtected Boolean This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentIsUnsupported Boolean This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentNameMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentProcessingLimitExceeded Boolean This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentPropertyContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-AttachmentSizeOver ByteQuantifiedSize This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-BetweenMemberOf1 RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-BetweenMemberOf2 RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-BlindCopyTo RecipientIdParameter[] This parameter specifies an action or part of an action for the rule.
-Comments String The Comments parameter specifies optional descriptive text for the rule (for example, what the rule is used for, or how it has changed over time). The length of the comment can't exceed 1024 characters. If the value...
-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.
-ContentCharacterSetContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-CopyTo RecipientIdParameter[] This parameter specifies an action or part of an action for the rule.
-DeleteMessage Boolean This parameter specifies an action or part of an action for the rule.
-Disconnect Boolean This parameter is functional only on Edge Transport servers in on-premises Exchange.
-DlpPolicy String **Note**: This parameter is functional only in on-premises Exchange.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-ExceptIfADComparisonAttribute ADAttribute This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfADComparisonOperator Evaluation This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAnyOfCcHeader RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAnyOfCcHeaderMemberOf RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAnyOfRecipientAddressContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAnyOfRecipientAddressMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAnyOfToCcHeader RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAnyOfToCcHeaderMemberOf RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAnyOfToHeader RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAnyOfToHeaderMemberOf RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentExtensionMatchesWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentHasExecutableContent Boolean This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentIsPasswordProtected Boolean This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentIsUnsupported Boolean This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentNameMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentProcessingLimitExceeded Boolean This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentPropertyContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfAttachmentSizeOver ByteQuantifiedSize This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfBetweenMemberOf1 RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfBetweenMemberOf2 RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfContentCharacterSetContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfFrom RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfFromAddressContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfFromAddressMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfFromMemberOf RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfFromScope FromUserScope This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfHasClassification String This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfHasNoClassification Boolean This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfHasSenderOverride Boolean **Note:** This parameter is functional only in on-premises Exchange.
-ExceptIfHeaderContainsMessageHeader HeaderName This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfHeaderContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfHeaderMatchesMessageHeader HeaderName This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfHeaderMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfManagerAddresses RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfManagerForEvaluatedUser EvaluatedUser This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfMessageContainsDataClassifications Hashtable[] **Note:** This parameter is functional only in on-premises Exchange.
-ExceptIfMessageSizeOver ByteQuantifiedSize This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfMessageTypeMatches MessageType This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfRecipientADAttributeContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfRecipientADAttributeMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfRecipientAddressContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfRecipientAddressMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfRecipientDomainIs Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfRecipientInSenderList Word[] This parameter is available only in the cloud-based service.
-ExceptIfSCLOver SclValue This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSenderADAttributeContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSenderADAttributeMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSenderDomainIs Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSenderInRecipientList Word[] This parameter is available only in the cloud-based service.
-ExceptIfSenderIpRanges MultiValuedProperty This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSenderManagementRelationship ManagementRelationship This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSentTo RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSentToMemberOf RecipientIdParameter[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSentToScope ToUserScope This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSubjectContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSubjectMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSubjectOrBodyContainsWords Word[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfSubjectOrBodyMatchesPatterns Pattern[] This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExceptIfWithImportance Importance This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-ExpiryDate DateTime This parameter specifies an exception or part of an exception for the rule. The name of the corresponding condition parameter doesn't include the ExceptIf prefix.
-From RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-FromAddressContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-FromAddressMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-FromMemberOf RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-FromScope FromUserScope This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-GenerateIncidentReport RecipientIdParameter This parameter specifies an action or part of an action for the rule.
-GenerateNotification DisclaimerText This parameter specifies an action or part of an action for the rule.
-HasClassification String This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-HasNoClassification Boolean This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-HasSenderOverride Boolean **Note:** This parameter is functional only in on-premises Exchange.
-HeaderContainsMessageHeader HeaderName This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-HeaderContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-HeaderMatchesMessageHeader HeaderName This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-HeaderMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-IncidentReportContent IncidentReportContent[] This parameter specifies an action or part of an action for the rule.
-IncidentReportOriginalMail IncidentReportOriginalMail This parameter is deprecated and no longer used. Use the IncidentReportContent parameter instead. The value AttachOriginalMail on the IncidentReportContent parameter is equivalent to setting this parameter to the...
-LogEventText EventLogText This parameter is functional only on Edge Transport servers in on-premises Exchange.
-ManagerAddresses RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-ManagerForEvaluatedUser EvaluatedUser This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-MessageContainsDataClassifications Hashtable[] **Note:** This parameter is functional only in on-premises Exchange.
-MessageSizeOver ByteQuantifiedSize This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-MessageTypeMatches MessageType This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-Mode RuleMode The Mode parameter specifies how the rule operates. Valid values are:
-ModerateMessageByManager Boolean This parameter specifies an action or part of an action for the rule.
-ModerateMessageByUser RecipientIdParameter[] This parameter specifies an action or part of an action for the rule.
-Name String The Name parameter specifies the display name of the transport rule to be created. The length of the name canThe Name parameter specifies the unique name of the rule. The maximum length is 64 characters. If the value...
-NotifySender NotifySenderType **Note:** This parameter is functional only in on-premises Exchange.
-PrependSubject SubjectPrefix This parameter specifies an action or part of an action for the rule.
-Priority Int32 The Priority parameter specifies a priority value for the rule that determines the order of rule processing. A lower integer value indicates a higher priority, the value 0 is the highest priority, and rules can't...
-Quarantine Boolean This parameter specifies an action or part of an action for the rule.
-RecipientADAttributeContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-RecipientADAttributeMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-RecipientAddressContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-RecipientAddressMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-RecipientAddressType RecipientAddressType This parameter is available only in the cloud-based service.
-RecipientDomainIs Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-RecipientInSenderList Word[] This parameter is available only in the cloud-based service.
-RedirectMessageTo RecipientIdParameter[] This parameter specifies an action or part of an action for the rule.
-RejectMessageEnhancedStatusCode RejectEnhancedStatus This parameter specifies an action or part of an action for the rule.
-RejectMessageReasonText RejectText This parameter specifies an action or part of an action for the rule.
-RemoveHeader HeaderName This parameter specifies an action or part of an action for the rule.
-RemoveOME Boolean This parameter is available only in the cloud-based service.
-RemoveOMEv2 Boolean This parameter is available only in the cloud-based service.
-RemoveRMSAttachmentEncryption Boolean This parameter is available only in the cloud-based service.
-RouteMessageOutboundConnector OutboundConnectorIdParameter This parameter is available only in the cloud-based service.
-RouteMessageOutboundRequireTls Boolean This parameter specifies an action or part of an action for the rule.
-RuleErrorAction RuleErrorAction The RuleErrorAction parameter specifies what to do if rule processing can't be completed on messages. Valid values are:
-RuleSubType RuleSubType The RuleSubType parameter specifies the rule type. Valid values are:
-SCLOver SclValue This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SenderADAttributeContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SenderADAttributeMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SenderAddressLocation SenderAddressLocation The SenderAddressLocation parameter specifies where to look for sender addresses in conditions and exceptions that examine sender email addresses. Valid values are:
-SenderDomainIs Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SenderInRecipientList Word[] This parameter is available only in the cloud-based service.
-SenderIpRanges MultiValuedProperty This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SenderManagementRelationship ManagementRelationship This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SentTo RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SentToMemberOf RecipientIdParameter[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SentToScope ToUserScope This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SetAuditSeverity String This parameter specifies an action or part of an action for the rule.
-SetHeaderName HeaderName This parameter specifies an action or part of an action for the rule.
-SetHeaderValue HeaderValue This parameter specifies an action or part of an action for the rule.
-SetSCL SclValue This parameter specifies an action or part of an action for the rule.
-SmtpRejectMessageRejectStatusCode RejectStatusCode This parameter is functional only on Edge Transport servers in on-premises Exchange.
-SmtpRejectMessageRejectText RejectText This parameter is functional only on Edge Transport servers in on-premises Exchange.
-StopRuleProcessing Boolean This parameter specifies an action or part of an action for the rule.
-SubjectContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SubjectMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SubjectOrBodyContainsWords Word[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-SubjectOrBodyMatchesPatterns Pattern[] This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
-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.
-WithImportance Importance This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.

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