Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

Set-TransportRule

 

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

Topic Last Modified: 2014-01-24

Use the Set-TransportRule cmdlet to modify existing transport rules in your organization.

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

Set-TransportRule -Identity <RuleIdParameter> [-ActivationDate <DateTime>] [-ADComparisonAttribute <DisplayName | FirstName | Initials | LastName | Office | PhoneNumber | OtherPhoneNumber | Email | Street | POBox | City | State | ZipCode | Country | UserLogonName | HomePhoneNumber | OtherHomePhoneNumber | PagerNumber | MobileNumber | FaxNumber | OtherFaxNumber | Notes | Title | Department | Company | Manager | CustomAttribute1 | CustomAttribute2 | CustomAttribute3 | CustomAttribute4 | CustomAttribute5 | CustomAttribute6 | CustomAttribute7 | CustomAttribute8 | CustomAttribute9 | CustomAttribute10 | CustomAttribute11 | CustomAttribute12 | CustomAttribute13 | CustomAttribute14 | CustomAttribute15>] [-ADComparisonOperator <Equal | NotEqual>] [-AddManagerAsRecipientType <To | Cc | Bcc | Redirect>] [-AddToRecipients <RecipientIdParameter[]>] [-AnyOfCcHeader <RecipientIdParameter[]>] [-AnyOfCcHeaderMemberOf <RecipientIdParameter[]>] [-AnyOfRecipientAddressContainsWords <Word[]>] [-AnyOfRecipientAddressMatchesPatterns <Pattern[]>] [-AnyOfToCcHeader <RecipientIdParameter[]>] [-AnyOfToCcHeaderMemberOf <RecipientIdParameter[]>] [-AnyOfToHeader <RecipientIdParameter[]>] [-AnyOfToHeaderMemberOf <RecipientIdParameter[]>] [-ApplyClassification <String>] [-ApplyHtmlDisclaimerFallbackAction <Wrap | Ignore | Reject>] [-ApplyHtmlDisclaimerLocation <Append | Prepend>] [-ApplyHtmlDisclaimerText <DisclaimerText>] [-ApplyOME <$true | $false>] [-ApplyRightsProtectionTemplate <RmsTemplateIdParameter>] [-AttachmentContainsWords <Word[]>] [-AttachmentExtensionMatchesWords <Word[]>] [-AttachmentHasExecutableContent <$true | $false>] [-AttachmentIsPasswordProtected <$true | $false>] [-AttachmentIsUnsupported <$true | $false>] [-AttachmentMatchesPatterns <Pattern[]>] [-AttachmentNameMatchesPatterns <Pattern[]>] [-AttachmentProcessingLimitExceeded <$true | $false>] [-AttachmentSizeOver <ByteQuantifiedSize>] [-BetweenMemberOf1 <RecipientIdParameter[]>] [-BetweenMemberOf2 <RecipientIdParameter[]>] [-BlindCopyTo <RecipientIdParameter[]>] [-Comments <String>] [-Confirm [<SwitchParameter>]] [-ContentCharacterSetContainsWords <Word[]>] [-CopyTo <RecipientIdParameter[]>] [-DeleteMessage <$true | $false>] [-Disconnect <$true | $false>] [-DlpPolicy <String>] [-DomainController <Fqdn>] [-ExceptIfADComparisonAttribute <DisplayName | FirstName | Initials | LastName | Office | PhoneNumber | OtherPhoneNumber | Email | Street | POBox | City | State | ZipCode | Country | UserLogonName | HomePhoneNumber | OtherHomePhoneNumber | PagerNumber | MobileNumber | FaxNumber | OtherFaxNumber | Notes | Title | Department | Company | Manager | CustomAttribute1 | CustomAttribute2 | CustomAttribute3 | CustomAttribute4 | CustomAttribute5 | CustomAttribute6 | CustomAttribute7 | CustomAttribute8 | CustomAttribute9 | CustomAttribute10 | CustomAttribute11 | CustomAttribute12 | CustomAttribute13 | CustomAttribute14 | CustomAttribute15>] [-ExceptIfADComparisonOperator <Equal | NotEqual>] [-ExceptIfAnyOfCcHeader <RecipientIdParameter[]>] [-ExceptIfAnyOfCcHeaderMemberOf <RecipientIdParameter[]>] [-ExceptIfAnyOfRecipientAddressContainsWords <Word[]>] [-ExceptIfAnyOfRecipientAddressMatchesPatterns <Pattern[]>] [-ExceptIfAnyOfToCcHeader <RecipientIdParameter[]>] [-ExceptIfAnyOfToCcHeaderMemberOf <RecipientIdParameter[]>] [-ExceptIfAnyOfToHeader <RecipientIdParameter[]>] [-ExceptIfAnyOfToHeaderMemberOf <RecipientIdParameter[]>] [-ExceptIfAttachmentContainsWords <Word[]>] [-ExceptIfAttachmentExtensionMatchesWords <Word[]>] [-ExceptIfAttachmentHasExecutableContent <$true | $false>] [-ExceptIfAttachmentIsPasswordProtected <$true | $false>] [-ExceptIfAttachmentIsUnsupported <$true | $false>] [-ExceptIfAttachmentMatchesPatterns <Pattern[]>] [-ExceptIfAttachmentNameMatchesPatterns <Pattern[]>] [-ExceptIfAttachmentProcessingLimitExceeded <$true | $false>] [-ExceptIfAttachmentSizeOver <ByteQuantifiedSize>] [-ExceptIfBetweenMemberOf1 <RecipientIdParameter[]>] [-ExceptIfBetweenMemberOf2 <RecipientIdParameter[]>] [-ExceptIfContentCharacterSetContainsWords <Word[]>] [-ExceptIfFrom <RecipientIdParameter[]>] [-ExceptIfFromAddressContainsWords <Word[]>] [-ExceptIfFromAddressMatchesPatterns <Pattern[]>] [-ExceptIfFromMemberOf <RecipientIdParameter[]>] [-ExceptIfFromScope <InOrganization | NotInOrganization>] [-ExceptIfHasClassification <String>] [-ExceptIfHasNoClassification <$true | $false>] [-ExceptIfHasSenderOverride <$true | $false>] [-ExceptIfHeaderContainsMessageHeader <HeaderName>] [-ExceptIfHeaderContainsWords <Word[]>] [-ExceptIfHeaderMatchesMessageHeader <HeaderName>] [-ExceptIfHeaderMatchesPatterns <Pattern[]>] [-ExceptIfManagerAddresses <RecipientIdParameter[]>] [-ExceptIfManagerForEvaluatedUser <Sender | Recipient>] [-ExceptIfMessageContainsDataClassifications <Hashtable[]>] [-ExceptIfMessageSizeOver <ByteQuantifiedSize>] [-ExceptIfMessageTypeMatches <OOF | AutoForward | Encrypted | Calendaring | PermissionControlled | Voicemail | Signed | ApprovalRequest | ReadReceipt>] [-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 <Manager | DirectReport>] [-ExceptIfSentTo <RecipientIdParameter[]>] [-ExceptIfSentToMemberOf <RecipientIdParameter[]>] [-ExceptIfSentToScope <InOrganization | NotInOrganization | ExternalPartner | ExternalNonPartner>] [-ExceptIfSubjectContainsWords <Word[]>] [-ExceptIfSubjectMatchesPatterns <Pattern[]>] [-ExceptIfSubjectOrBodyContainsWords <Word[]>] [-ExceptIfSubjectOrBodyMatchesPatterns <Pattern[]>] [-ExceptIfWithImportance <Low | Normal | High>] [-ExpiryDate <DateTime>] [-From <RecipientIdParameter[]>] [-FromAddressContainsWords <Word[]>] [-FromAddressMatchesPatterns <Pattern[]>] [-FromMemberOf <RecipientIdParameter[]>] [-FromScope <InOrganization | NotInOrganization>] [-GenerateIncidentReport <RecipientIdParameter>] [-HasClassification <String>] [-HasNoClassification <$true | $false>] [-HasSenderOverride <$true | $false>] [-HeaderContainsMessageHeader <HeaderName>] [-HeaderContainsWords <Word[]>] [-HeaderMatchesMessageHeader <HeaderName>] [-HeaderMatchesPatterns <Pattern[]>] [-IncidentReportContent <IncidentReportContent[]>] [-IncidentReportOriginalMail <IncludeOriginalMail | DoNotIncludeOriginalMail>] [-LogEventText <EventLogText>] [-ManagerAddresses <RecipientIdParameter[]>] [-ManagerForEvaluatedUser <Sender | Recipient>] [-MessageContainsDataClassifications <Hashtable[]>] [-MessageSizeOver <ByteQuantifiedSize>] [-MessageTypeMatches <OOF | AutoForward | Encrypted | Calendaring | PermissionControlled | Voicemail | Signed | ApprovalRequest | ReadReceipt>] [-Mode <Audit | AuditAndNotify | Enforce>] [-ModerateMessageByManager <$true | $false>] [-ModerateMessageByUser <RecipientIdParameter[]>] [-Name <String>] [-NotifySender <NotifyOnly | RejectMessage | RejectUnlessFalsePositiveOverride | RejectUnlessSilentOverride | RejectUnlessExplicitOverride>] [-PrependSubject <SubjectPrefix>] [-Priority <Int32>] [-Quarantine <$true | $false>] [-RecipientADAttributeContainsWords <Word[]>] [-RecipientADAttributeMatchesPatterns <Pattern[]>] [-RecipientAddressContainsWords <Word[]>] [-RecipientAddressMatchesPatterns <Pattern[]>] [-RecipientDomainIs <Word[]>] [-RecipientInSenderList <Word[]>] [-RedirectMessageTo <RecipientIdParameter[]>] [-RejectMessageEnhancedStatusCode <RejectEnhancedStatus>] [-RejectMessageReasonText <DsnText>] [-RemoveHeader <HeaderName>] [-RemoveOME <$true | $false>] [-RouteMessageOutboundConnector <OutboundConnectorIdParameter>] [-RouteMessageOutboundRequireTls <$true | $false>] [-RuleErrorAction <Ignore | Defer>] [-RuleSubType <None | Dlp>] [-SCLOver <SclValue>] [-SenderADAttributeContainsWords <Word[]>] [-SenderADAttributeMatchesPatterns <Pattern[]>] [-SenderAddressLocation <Header | Envelope | HeaderOrEnvelope>] [-SenderDomainIs <Word[]>] [-SenderInRecipientList <Word[]>] [-SenderIpRanges <MultiValuedProperty>] [-SenderManagementRelationship <Manager | DirectReport>] [-SentTo <RecipientIdParameter[]>] [-SentToMemberOf <RecipientIdParameter[]>] [-SentToScope <InOrganization | NotInOrganization | ExternalPartner | ExternalNonPartner>] [-SetAuditSeverity <String>] [-SetHeaderName <HeaderName>] [-SetHeaderValue <HeaderValue>] [-SetSCL <SclValue>] [-SmtpRejectMessageRejectStatusCode <RejectStatusCode>] [-SmtpRejectMessageRejectText <RejectText>] [-StopRuleProcessing <$true | $false>] [-SubjectContainsWords <Word[]>] [-SubjectMatchesPatterns <Pattern[]>] [-SubjectOrBodyContainsWords <Word[]>] [-SubjectOrBodyMatchesPatterns <Pattern[]>] [-WhatIf [<SwitchParameter>]] [-WithImportance <Low | Normal | High>]

This example modifies the Sales Team Disclaimer transport rule. Modifying the value of one condition doesn't affect other conditions, exceptions, or actions used in the rule.

This example sets the FromMemberOf parameter to a value of Sales-Group, which specifies that the rule is applied if the sender of the message is a member of the Sales-Group distribution group.

Set-TransportRule "Sales Team Disclaimer" -FromMemberOf "Sales-Group" 

Transport rule conditions and exceptions include corresponding values to test for. For a list of supported transport rule conditions, see Transport Rule Conditions (Predicates).

Transport rules apply actions to messages, some with corresponding action values. For a list of supported transport rule actions, see Transport Rule Actions.

For detailed information about how to create a transport rule, see Manage Transport Rules. To learn more about transport rules, see Transport Rules.

In on-premises Exchange organizations, Transport rules created on Mailbox servers are stored in Active Directory. All Mailbox servers in the organization have access to the same set of transport rules. On Edge Transport servers, transport rules are saved in the local copy of Active Directory Lightweight Directory Services (AD LDS). Transport rules aren't shared or replicated between Edge Transport servers or between Mailbox servers and Edge Transport servers. Also, Mailbox servers and Edge Transport servers share a set of common conditions and actions, but some conditions and actions are exclusive to each server role.

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.

 

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.RuleIdParameter

The Identity parameter specifies the transport rule you want to modify. Use the name or GUID of the transport rule.

ActivationDate

Optional

System.DateTime

The ActivationDate parameter specifies the date when this rule will become effective. The rule won't take any action on messages until the day you specify for this parameter.

ADComparisonAttribute

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.ADAttribute

The ADComparisonAttribute parameter specifies an Active Directory attribute to compare between the sender and recipients. When you use this parameter, the specified Active Directory attribute of the sender is compared to the same Active Directory attribute of all the recipients of the message. You can use one of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

When specifying the ADComparisonAttribute parameter, if you don't specify a value for the ADComparisonOperator parameter, the default comparison operator Equal is used.

This parameter is used to define a rule condition.

ADComparisonOperator

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Evaluation

The ADComparisonOperator parameter specifies a comparison operator for the ADComparisonAttribute parameter. Valid values include:

  • Equal

  • NotEqual

If you use the ADComparisonOperator parameter, you must also use the ADComparisonAttribute parameter.

This parameter is used to define a rule condition.

AddManagerAsRecipientType

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.AddedRecipientType

The AddManagerAsRecipientType parameter specifies how the message is relayed to the manager of the sender or recipient. You can use any of the following values:

  • To   The manager is added to the recipients in the To line of the message.

  • Cc   The manager is added to the recipients in the carbon copy (Cc) line of the message.

  • Bcc   The manager is added to the recipients in the blind carbon copy (Bcc) line of the message.

  • Redirect   The message is redirected to the manager instead of being delivered to the original recipients.

This parameter is used to define a rule action.

AddToRecipients

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AddToRecipients parameter specifies one or more additional recipients for the message. Separate multiple recipients with commas. The specified recipients are added as To recipients.

This parameter is used to define a rule action.

AnyOfCcHeader

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AnyOfCcHeader parameter specifies one or more recipients. The rule is applied if any of these recipients are present as a Cc recipient.

This parameter is used to define a rule condition.

AnyOfCcHeaderMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AnyOfCcHeaderMemberOf parameter specifies a distribution group. The rule is applied if a member of the specified distribution group is present as a Cc recipient.

This parameter is used to define a rule condition.

AnyOfRecipientAddressContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The AnyOfRecipientAddressContainsWords parameter specifies one or more words to check in a recipient address. The rule is applied if a recipient's address includes any of these words.

This parameter is used to define a rule condition.

AnyOfRecipientAddressMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The AnyOfRecipientAddressMatchesPatterns parameter specifies one or more regular expressions to match in a recipient address. The rule is applied if any of the recipients' addresses matches the pattern you specify.

This parameter is used to define a rule condition.

AnyOfToCcHeader

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AnyOfToCcHeader parameter specifies one or more recipients. The rule is applied if any of the recipients specified are present as a To or Cc recipient.

This parameter is used to define a rule condition.

AnyOfToCcHeaderMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AnyOfToCcHeaderMemberOf parameter specifies a distribution group. The rule is applied if a member of the specified distribution group is present as a To or Cc recipient.

This parameter is used to define a rule condition.

AnyOfToHeader

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AnyOfToHeader parameter specifies one or more recipients. The rule is applied if any of the specified recipients are present as a To recipient.

This parameter is used to define a rule condition.

AnyOfToHeaderMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AnyOfToHeaderMemberOf parameter specifies a distribution group. The rule is applied if a member of the specified distribution group is present as a To recipient.

This parameter is used to define a rule condition.

ApplyClassification

Optional

System.String

The ApplyClassification parameter specifies a message classification to apply to the message.

NoteNote:
The message classification referred to in this parameter is the custom message classification that you can create in your organization. It isn't related to the data loss prevention (DLP) classification.

This parameter is used to define a rule action.

ApplyHtmlDisclaimerFallbackAction

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.DisclaimerFallbackAction

The ApplyHtmlDisclaimerFallbackAction parameter specifies an action to fall back to if the HTML disclaimer can't be applied to a message. Valid fallback actions include the following:

  • Wrap   The original message is wrapped as an attachment in a new message, and the disclaimer is used as the message body for the new message.

  • Ignore   The rule is ignored, and the message is delivered without the disclaimer.

  • Reject   The message is rejected.

NoteNote:
This parameter is used with the ApplyHtmlDisclaimerText parameter. If you use the ApplyHtmlDisclaimerText parameter without specifying a value for this parameter, the default fallback action, Wrap, is used.
This parameter is used to define a rule action.

ApplyHtmlDisclaimerLocation

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.DisclaimerLocation

The ApplyHtmlDisclaimerLocation parameter specifies the location within the message where the HTML disclaimer text is inserted. You can use either of the following two values:

  • Append   The disclaimer is added to the end of the message body.

  • Prepend   The disclaimer is inserted to the beginning of the message body.

NoteNote:
This parameter is used with the ApplyHtmlDisclaimerText parameter. If you use the ApplyHtmlDisclaimerText parameter without specifying a value for this parameter, the default value, Append, is used.

This parameter is used to define a rule action.

ApplyHtmlDisclaimerText

Optional

Microsoft.Exchange.Data.DisclaimerText

The ApplyHtmlDisclaimerText parameter specifies disclaimer text to be inserted in the message. Disclaimer text can include HTML tags and inline cascading style sheet (CSS) tags. You can add images using the IMG tag.

This parameter is used to define a rule action.

ApplyOME

Optional

System.Boolean

The ApplyOME parameter specifies that a message and its attachments will be encrypted if the message matches the conditions of this rule.

Valid input for this parameter is $true or $false. The default is $false.

This parameter is used to define a rule action.

ApplyRightsProtectionTemplate

Optional

Microsoft.Exchange.Configuration.Tasks.RmsTemplateIdParameter

The ApplyRightsProtectionTemplate parameter specifies the name of a rights management service (RMS) template to apply to the message. This action adds rights protection to the messages that meet the conditions of this rule. To use this action, an Active Directory Rights Management Services (AD RMS) server should exist in the topology or the organization should be configured to use the ILS service.

For more information, see Transport Protection Rules.

This parameter is used to define a rule action.

AttachmentContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The AttachmentContainsWords parameter specifies one or more words to check in attachments. Only supported attachment types are checked. The rule is applied if any of the attachments contain any of the words you specify.

This parameter is used to define a rule condition.

AttachmentExtensionMatchesWords

Optional

Microsoft.Exchange.Data.Word[]

The AttachmentExtensionMatchesWords parameter specifies one or more word patterns to check in attachment extensions. The rule is applied if the extensions of any of the attachments match the word patterns you specify.

This parameter is used to define a rule condition.

AttachmentHasExecutableContent

Optional

System.Boolean

The AttachmentHasExecutableContent parameter specifies whether the rule is applied when any attachments in the message contain executable content. If you set this parameter to $true, the rule is applied if any of the attachments contains executable content.

This parameter is used to define a rule condition.

AttachmentIsPasswordProtected

Optional

System.Boolean

The AttachmentIsPasswordProtected parameter specifies whether the attachment is a password protected file whose contents can't be inspected. For example, if a password protected ZIP file is in a message, this condition will be met. The rule is applied if any attachment is password protected.

This parameter is used to define a rule condition.

AttachmentIsUnsupported

Optional

System.Boolean

The AttachmentIsUnsupported parameter specifies whether the rule is applied when any attachments in the message are of an unsupported type. Unsupported attachments are attachments for which an IFilter isn't installed on the servers. If you set this parameter to $true, the rule is applied if any of the attachments is an unsupported type.

This parameter is used to define a rule condition.

AttachmentMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The AttachmentMatchesPatterns parameter specifies one or more regular expressions to match in message attachment content. Only supported attachment types are checked for the specified pattern.

NoteNote:
Only the first 150 kilobytes (KB) of the attachment is scanned when trying to match a pattern.

This parameter is used to define a rule condition.

AttachmentNameMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The AttachmentNameMatchesPatterns parameter specifies one or more word patterns to check in attachment names. The rule is applied if the name of any attachment matches the patterns you specify.

This parameter is used to define a rule condition.

AttachmentProcessingLimitExceeded

Optional

System.Boolean

The AttachmentProcessingLimitExceeded parameter specifies whether the scanning of attachments in the message didn't complete because the processing exceeded built-in limits. This condition is used to create rules that work together with other attachment processing rules and gives you the ability to handle messages whose content couldn't be fully scanned.

Valid values are $true and $false.

This parameter is used to define a rule condition.

AttachmentSizeOver

Optional

Microsoft.Exchange.Data.ByteQuantifiedSize

The AttachmentSizeOver parameter specifies an attachment size. The rule is applied if the size of any of the attachments exceeds the specified size.

This parameter is used to define a rule condition.

BetweenMemberOf1

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The BetweenMemberOf1 parameter specifies a distribution group and must be used together with the BetweenMemberOf2 parameter. The rule is applied if the message is sent between members of the distribution groups specified in these parameters.

This parameter is used to define a rule condition.

BetweenMemberOf2

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The BetweenMemberOf2 parameter specifies a distribution group and must be used together with the BetweenMemberOf1 parameter. The rule is applied if the message is sent between members of the distribution groups specified in these parameters.

This parameter is used to define a rule condition.

BlindCopyTo

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The BlindCopyTo parameter specifies one or more recipients to add to the message as Bcc recipients.

This parameter is used to define a rule action.

Comments

Optional

System.String

The Comments parameter specifies informative comments for the transport rule, such as what the rule is used for or how it has changed over time. The length of the comment can't exceed 1024 characters.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

ContentCharacterSetContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ContentCharacterSetContainsWords parameter specifies one or more character set names to check for in the message. The rule is applied if the message contains any of the character sets specified.

This parameter is used to define a rule condition.

CopyTo

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The CopyTo parameter specifies one or more recipients to add to the message as Cc recipients.

This parameter is used to define a rule action.

DeleteMessage

Optional

System.Boolean

The DeleteMessage parameter specifies that the rule deletes any message that matches the conditions specified.

This parameter is used to define a rule action.

Disconnect

Optional

System.Boolean

The Disconnect parameter specifies whether the rules agent disconnects the SMTP session.

This parameter is used to define a rule action.

DlpPolicy

Optional

System.String

The DlpPolicy parameter specifies the data loss prevention (DLP) policy associated with this rule. Each DLP policy is enforced using a set of transport rules. To learn more about DLP, see Data Loss Prevention.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory.

ExceptIfADComparisonAttribute

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.ADAttribute

The ExceptIfADComparisonAttribute parameter specifies an Active Directory attribute to compare between the sender and recipients. When you use this parameter, the specified Active Directory attribute of the sender is compared to the same Active Directory attribute of all the recipients of the message. You can use one of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

When specifying the ExceptIfADComparisonAttribute parameter, if you don't specify a value for the ExceptIfADComparisonOperator parameter, the default comparison operator Equal is used.

ExceptIfADComparisonOperator

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Evaluation

The ExceptIfADComparisonOperator parameter specifies a comparison operator for the ExceptIfADComparisonAttribute parameter. Valid values are:

  • Equal

  • NotEqual

If you use the ExceptIfADComparisonOperator parameter, you must also use the ExceptIfADComparisonAttribute parameter.

ExceptIfAnyOfCcHeader

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfAnyOfCcHeader parameter specifies one or more recipients. The rule isn't applied if any of these recipients are present as a Cc recipient.

ExceptIfAnyOfCcHeaderMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfAnyOfCcHeaderMemberOf parameter specifies a distribution group. The rule isn't applied if a member of the specified distribution group is present as a Cc recipient.

ExceptIfAnyOfRecipientAddressContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfAnyOfRecipientAddressContainsWords parameter specifies one or more words to check in a recipient address. The rule isn't applied if a recipient's address includes any of these words.

ExceptIfAnyOfRecipientAddressMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfAnyOfRecipientAddressMatchesPatterns parameter specifies one or more regular expressions to match in a recipient address. The rule isn't applied if any of the recipient addresses matches the pattern you specify.

ExceptIfAnyOfToCcHeader

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfAnyOfToCcHeader parameter specifies one or more recipients. The rule isn't applied if any of the recipients specified are present as a To or Cc recipient.

ExceptIfAnyOfToCcHeaderMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfAnyOfToCcHeaderMemberOf parameter specifies a distribution group. The rule isn't applied if a member of the specified distribution group is present as a To or Cc recipient.

ExceptIfAnyOfToHeader

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfAnyOfToHeader parameter specifies one or more recipients. The rule isn't applied if any of the specified recipients are present as a To recipient.

ExceptIfAnyOfToHeaderMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfAnyOfToHeaderMemberOf parameter specifies a distribution group. The rule isn't applied if a member of the specified distribution group is present as a To recipient.

ExceptIfAttachmentContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfAttachmentContainsWords parameter specifies one or more words to check in attachments. Only supported attachment types are checked. The rule isn't applied if any of the attachments contain any of the words you specify.

ExceptIfAttachmentExtensionMatchesWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfAttachmentExtensionMatchesWords parameter specifies one or more word patterns to check in attachment extensions. The rule isn't applied if the extensions of any of the attachments match the word patterns you specify.

ExceptIfAttachmentHasExecutableContent

Optional

System.Boolean

The ExceptIfAttachmentHasExecutableContent parameter specifies whether the rule is applied when any attachments in the message contain executable content. If you set this parameter to $true, the rule isn't applied if any of the attachments contains executable content.

ExceptIfAttachmentIsPasswordProtected

Optional

System.Boolean

The ExceptIfAttachmentIsPasswordProtected parameter specifies whether the attachment is a password protected file whose contents can't be inspected. For example, if a password protected ZIP file is in a message, this exception will be met. The rule isn't applied if any attachment is password protected.

ExceptIfAttachmentIsUnsupported

Optional

System.Boolean

The ExceptIfAttachmentIsUnsupported parameter specifies whether the rule is applied when any attachments in the message are of an unsupported type. Unsupported attachments are attachments for which an IFilter isn't installed on your servers. If you set this parameter to $true the rule isn't applied if any of the attachments is an unsupported type.

ExceptIfAttachmentMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfAttachmentMatchesPatterns parameter specifies one or more regular expressions to match in message attachment content. Only supported attachment types are checked for the specified pattern.

NoteNote:
Only the first 150 KB of the attachment is scanned when trying to match a pattern.

ExceptIfAttachmentNameMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfAttachmentNameMatchesPatterns parameter specifies one or more word patterns to check in attachment names. The rule isn't applied if the name of any attachment matches the patterns you specify.

ExceptIfAttachmentProcessingLimitExceeded

Optional

System.Boolean

The ExceptIfAttachmentProcessingLimitExceeded parameter specifies whether the scanning of attachments in the message didn't complete because the processing exceeded built-in limits. This condition is used to create rules that work together with other attachment processing rules and gives you the ability to handle messages whose content couldn't be fully scanned.

Valid values are $true and $false.

ExceptIfAttachmentSizeOver

Optional

Microsoft.Exchange.Data.ByteQuantifiedSize

The ExceptIfAttachmentSizeOver parameter specifies an attachment size. The rule isn't applied if the size of any of the attachments exceeds the specified size.

ExceptIfBetweenMemberOf1

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfBetweenMemberOf1 parameter specifies a distribution group and must be used together with the ExceptIfBetweenMemberOf2 parameter. The rule isn't applied if the message is sent between members of the distribution groups specified in these parameters.

ExceptIfBetweenMemberOf2

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfBetweenMemberOf2 parameter specifies a distribution group and must be used together with the ExceptIfBetweenMemberOf1 parameter. The rule isn't applied if the message is sent between members of the distribution groups specified in these parameters.

ExceptIfContentCharacterSetContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfContentCharacterSetContainsWords parameter specifies one or more character set names to check for in the message. The rule isn't applied if the message contains any of the character sets specified.

ExceptIfFrom

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfFrom parameter specifies the sender. The rule isn't applied to messages received from this sender.

ExceptIfFromAddressContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfFromAddressContainsWords parameters specifies one or more words to check for in the From address. The rule isn't applied if the sender's address includes any of these words.

ExceptIfFromAddressMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfFromAddressMatchesPatterns parameter specifies one or more regular expressions to match in the sender's address. The rule isn't applied if the sender's address matches the pattern you specify.

ExceptIfFromMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfFromMemberOf parameter specifies a distribution group. The rule isn't applied if the sender of the message is a member of this distribution group.

ExceptIfFromScope

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.FromUserScope

The ExceptIfFromScope parameter specifies whether the sender is inside or outside your organization. Valid values for this parameter are:

  • InOrganization

  • NotInOrganization

ExceptIfHasClassification

Optional

System.String

The ExceptIfHasClassification parameter specifies a message classification. The rule isn't applied to messages that have the specified classification.

NoteNote:
The message classification referred to in this parameter is the custom message classification that you can create in your organization. It isn't related to the DLP classification.

ExceptIfHasNoClassification

Optional

System.Boolean

The ExceptIfHasNoClassification parameter specifies that the rule isn't applied to messages that don't have a message classification.

ExceptIfHasSenderOverride

Optional

System.Boolean

The ExceptIfHasSenderOverride parameter specifies the rule to check if the sender has chosen to override a DLP policy. Set this parameter to $true to prevent this rule from applying to messages where the sender took action to override a DLP policy restriction.

ExceptIfHeaderContainsMessageHeader

Optional

Microsoft.Exchange.Data.HeaderName

The ExceptIfHeaderContainsMessageHeader parameter specifies the SMTP message header to inspect for specific words or patterns. This parameter is used together with the ExceptIfHeaderContainsWords parameter.

ExceptIfHeaderContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfHeaderContainsWords parameter specifies one or more words to look for in the message header specified in the ExceptIfHeaderContainsMessageHeader parameter. The rule isn't applied to messages where the header value of the specified header matches any of the words specified.

ExceptIfHeaderMatchesMessageHeader

Optional

Microsoft.Exchange.Data.HeaderName

The ExceptIfHeaderMatchesMessageHeader parameter specifies an SMTP message header to inspect. This parameter is used together with the ExceptIfHeaderMatchesPatterns parameter.

ExceptIfHeaderMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfHeaderMatchesPatterns parameter specifies a pattern to match in the header specified in the ExceptIfHeaderMatchesMessageHeader parameter.

ExceptIfManagerAddresses

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfManagerAddresses parameter specifies a recipient. The rule isn't applied to messages where the specified recipient is the manager of the sender or the recipient. Whether it's the manager for the sender or the recipient is defined in the ExceptIfManagerForEvaluatedUser parameter.

ExceptIfManagerForEvaluatedUser

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.EvaluatedUser

The ExceptIfManagerForEvaluatedUser parameter specifies whether the sender or the recipient's manager should be evaluated. The specified user's manager attribute is compared with users specified in the ExceptIfManagerAddresses parameter. Valid values include:

  • Recipient

  • Sender

Use this parameter together with the ExceptIfManagerAddresses parameter.

ExceptIfMessageContainsDataClassifications

Optional

System.Collections.Hashtable[]

The ExceptIfMessageContainsDataClassifications parameter specifies the sensitive information types to look for in the message body and any of the attachments. For a list of sensitive information types available, see Sensitive Information Types Inventory.

ExceptIfMessageSizeOver

Optional

Microsoft.Exchange.Data.ByteQuantifiedSize

The ExceptIfMessageSizeOver parameter specifies a message size. The rule isn't applied to any messages that exceed the message size you specify for this parameter.

ExceptIfMessageTypeMatches

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.MessageType

The ExceptIfMessageTypeMatches parameter specifies a message type. The rule isn't applied to any messages that match the message type you specify. Valid values include:

  • OOF   Auto-reply messages configured by the user

  • AutoForward   Messages automatically forwarded to an alternative recipient

  • Encrypted   Encrypted messages

  • Calendaring   Meeting requests and responses

  • PermissionControlled   Messages that have specific permissions configured

  • Voicemail   Voice mail messages forwarded by Unified Messaging service

  • Signed   Digitally signed messages

  • ApprovalRequest   Moderation request messages sent to moderators

  • ReadReceipt   Read receipts

ExceptIfRecipientADAttributeContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfRecipientADAttributeContainsWords parameter specifies one or more words to check for in specific Active Directory attributes of the recipient. You can check against any of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

To specify a value for an Active Directory attribute, use the name of the Active Directory attribute followed by a colon and the words. For example, to look for the word Sales in the Department attribute, set this parameter to Department:Sales. If you want to specify multiple values for multiple attributes, separate them with commas. The rule isn't applied if any of the specified attributes have the value specified.

ExceptIfRecipientADAttributeMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfRecipientADAttributeMatchesPatterns parameter specifies one or more patterns to check for in the specified Active Directory attribute of the recipient. You can check against any of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

To specify a value for an Active Directory attribute, use the name of the Active Directory attribute followed by a colon and the pattern. If you want to specify multiple patterns for multiple attributes, separate them with commas. The rule isn't applied if the values of any of the specified attributes match the specified patterns for that attribute.

ExceptIfRecipientAddressContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfRecipientAddressContainsWords parameter specifies words to check for in the recipient address.

ExceptIfRecipientAddressMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfRecipientAddressMatchesPatterns parameter specifies one or more text patterns to match in the recipient address.

ExceptIfRecipientDomainIs

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfRecipientDomainIs parameter specifies the recipient's domain. The rule isn't applied to messages sent to recipients whose email addresses are in the specified domain.

ExceptIfRecipientInSenderList

Optional

Microsoft.Exchange.Data.Word[]

This parameter applies to objects in the cloud-based service. It isn’t available for on-premises deployments.

The ExceptIfRecipientInSenderList parameter specifies an exception when a recipient is defined in a supervision list entry on the sender's mailbox. Supervision list entries perform the following functions:

  • They specify individual exceptions for the user in the closed campus supervision policy.

  • They identify the user as a victim in the anti-bullying policy.

To view the supervision list entries that are configured on a user's mailbox, run the Get-SupervisionListEntry command and specify the user's mailbox.

ExceptIfSCLOver

Optional

Microsoft.Exchange.Data.SclValue

The ExceptIfSCLOver parameter specifies a spam confidence level (SCL) value. The rule isn't applied to messages with an SCL equal to or higher than the value specified. Valid SCL values are integers from 0 through 9, and -1. The value -1 specifies that the message is from a trusted source.

ExceptIfSenderADAttributeContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfSenderADAttributeContainsWords parameter specifies one or more words to check for in specific Active Directory attributes of the sender. You can check against any of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

To specify a value for an Active Directory attribute, use the name of the Active Directory attribute followed by a colon and the words. For example, to look for the word Sales in the Department attribute, set this parameter to Department:Sales. If you want to specify multiple values for multiple attributes, separate them with commas. The rule isn't applied if any of the specified attributes have the value specified.

ExceptIfSenderADAttributeMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfSenderADAttributeMatchesPatterns parameter specifies one or more patterns to check for in the specified Active Directory attribute of the sender. You can check against any of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

To specify a value for an Active Directory attribute, use the name of the Active Directory attribute followed by a colon and the pattern. If you want to specify multiple patterns for multiple attributes, separate them with commas. The rule isn't applied if the values of any of the specified attributes match the specified patterns for that attribute.

ExceptIfSenderDomainIs

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfSenderDomainIs parameter specifies the sender's domain. The rule isn't applied to messages received from senders whose email addresses are in the specified domain.

ExceptIfSenderInRecipientList

Optional

Microsoft.Exchange.Data.Word[]

This parameter applies to objects in the cloud-based service. It isn’t available for on-premises deployments.

The ExceptIfSenderInRecipientList parameter specifies an exception when the sender is defined in a supervision list entry on a recipient's mailbox. Supervision list entries perform the following functions:

  • They specify individual exceptions for the user in the closed campus supervision policy.

  • They identify the user as a victim in the anti-bullying policy.

To view the supervision list entries that are configured on a user's mailbox, run the Get-SupervisionListEntry command and specify the user's mailbox.

ExceptIfSenderIpRanges

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ExceptIfSenderIpRanges parameter specifies the IP ranges to compare with the sender's IP address. The rule isn't applied if the IP address of the sender falls within one of the IP ranges specified in this parameter.

ExceptIfSenderManagementRelationship

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.ManagementRelationship

The ExceptIfSenderManagementRelationship parameter specifies a relationship between the sender and the recipient. Valid values are:

  • Manager   The rule isn't applied if the sender is the manager of the recipient.

  • DirectReport   The rule isn't applied if the sender is a direct report of the recipient.

ExceptIfSentTo

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfSentTo parameter specifies a recipient. The rule isn't applied to messages sent to the specified recipient.

ExceptIfSentToMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ExceptIfSentToMemberOf parameter specifies a distribution group. The rule isn't applied to messages where any recipient is a member of the specified group.

NoteNote:
If the distribution group is removed after creation of the rule, no exception is made.

ExceptIfSentToScope

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.ToUserScope

The ExceptIfSentToScope parameter specifies whether the message is sent to internal, external, or partner recipients. Valid values are:

  • InOrganization   The recipients are internal to your organization.

  • NotInOrganization   The recipients are outside your organization.

  • ExternalPartner   The recipients are in a partner organization.

  • ExternalNonPartner   The recipients are external to your organization which isn't a partner organization.

ExceptIfSubjectContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfSubjectContainsWords parameter specifies words to look for in the message subject.

You can specify one or more words or phrases. When specifying more than one word or phrase, each word or phrase should be separated by a comma (,). When specifying a phrase that contains one or more spaces, you must enclose the phrase in quotation marks ("), for example:

Word1,"Phrase with spaces",word2.

ExceptIfSubjectMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfSubjectMatchesPatterns parameter specifies text patterns to check the message subject for.

ExceptIfSubjectOrBodyContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The ExceptIfSubjectOrBodyContainsWords parameter specifies words to look for in the message subject and body. The rule isn't applied if any of the words or phrases specified is found in the message subject or body.

You can specify one or more words or phrases. When specifying more than one word or phrase, each word or phrase should be separated by a comma (,). When specifying a phrase with one or more spaces, you must enclose the phrase in quotation marks ("), for example:

Word1,"Phrase with spaces",word2.

ExceptIfSubjectOrBodyMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The ExceptIfSubjectOrBodyMatchesPatterns parameter specifies text patterns to look for in the message subject and body. The rule isn't applied if the word specified is found in the message subject or body.

ExceptIfWithImportance

Optional

Microsoft.Exchange.Management.Tasks.Importance

The ExceptIfWithImportance parameter specifies message importance. The rule isn't applied to messages matching the specified importance. Valid values are:

  • High

  • Low

  • Normal

ExpiryDate

Optional

System.DateTime

The ExpiryDate parameter specifies the date when this rule will stop processing. The rule won't take any action on messages past the date you specify for this parameter.

From

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The From parameter specifies the sender. The rule is applied to messages received from this sender.

This parameter is used to define a rule condition.

FromAddressContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The FromAddressContainsWords parameter specifies one or more words to check for in the From address. The rule is applied if the sender's address includes any of these words.

This parameter is used to define a rule condition.

FromAddressMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The FromAddressMatchesPatterns parameter specifies one or more regular expressions to match in the sender's address. The rule is applied if the sender's address matches the pattern you specify.

This parameter is used to define a rule condition.

FromMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The FromMemberOf parameter specifies a distribution group. The rule is applied if the sender of the message is a member of this distribution group.

This parameter is used to define a rule condition.

FromScope

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.FromUserScope

The FromScope parameter specifies whether the sender is inside or outside your organization. Valid values for this parameter are:

  • InOrganization

  • NotInOrganization

This parameter is used to define a rule condition.

GenerateIncidentReport

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter

The GenerateIncidentReport parameter specifies the recipient to whom incident reports will be sent. An incident report is generated for messages that violate a DLP policy in your organization.

This parameter is used to define a rule action.

HasClassification

Optional

System.String

The HasClassification parameter specifies a message classification. The rule is applied to messages that have the specified classification.

NoteNote:
The message classification referred to in this parameter is the custom message classification that you can create in your organization. It isn't related to the DLP classification.

This parameter is used to define a rule condition.

HasNoClassification

Optional

System.Boolean

The HasNoClassification parameter specifies whether the rule is applied to messages that don't have a message classification.

If you set this parameter to $true, the rule is applied to all messages that don't have a message classification.

If you set this parameter to $false, the rule is applied to all messages that have one or more message classifications.

This parameter is used to define a rule condition.

HasSenderOverride

Optional

System.Boolean

The HasSenderOverride parameter specifies the rule to check if the sender has chosen to override a DLP policy. Set this parameter to $true to apply this rule to messages where the sender took action to override a DLP policy restriction.

This parameter is used to define a rule condition.

HeaderContainsMessageHeader

Optional

Microsoft.Exchange.Data.HeaderName

The HeaderContainsMessageHeader parameter specifies the SMTP message header to inspect for specific words or patterns. This parameter is used together with the HeaderContainsWords parameter.

This parameter is used to define a rule condition.

HeaderContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The HeaderContainsWords parameter specifies one or more words to look for in the message header specified in the HeaderContainsMessageHeader parameter. The rule is applied to messages where the header value of the specified header matches any of the words specified.

This parameter is used to define a rule condition.

HeaderMatchesMessageHeader

Optional

Microsoft.Exchange.Data.HeaderName

The HeaderMatchesMessageHeader parameter specifies an SMTP message header to inspect. This parameter is used together with the HeaderMatchesPatterns parameter.

This parameter is used to define a rule condition.

HeaderMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The HeaderMatchesPatterns parameter specifies a pattern to match in the header specified in the HeaderMatchesMessageHeader parameter.

This parameter is used to define a rule condition.

IncidentReportContent

Optional

Microsoft.Exchange.MessagingPolicies.Rules.IncidentReportContent[]

The IncidentReportContent parameter specifies the message properties that are included in incident reports. This parameter is used together with the GenerateIncidentReport parameter.

The valid values are:

  • Sender   Includes the sender of the message.

  • Recipients   Includes the recipients in the To: box of the message. Only the first 10 recipients are displayed in the incident report. If there are more than 10 recipients, the remaining number of recipients will be displayed.

  • Subject   Includes the message subject.

  • CC   Includes the recipients in the Cc: box of the message. Only the first 10 recipients are displayed in the incident report. If there are more than 10 recipients, the remaining number of recipients will be displayed.

  • BCC   Includes the recipients in the Bcc: box of the message. Only the first 10 recipients are displayed in the incident report. If there are more than 10 recipients, the remaining number of recipients will be displayed.

  • Severity   Includes the audit severity of the rule that was triggered. If the message was processed by more than one rule, the highest severity is displayed.

  • Override   Includes the override if the sender has chosen to override a PolicyTip. If the sender has provided a justification, the first 100 characters of the justification is also included.

  • RuleDetections   Includes the list of rules that the message triggered.

  • FalsePositive   Includes the false positive if the sender marked the message as a false positive for a PolicyTip.

  • DataClassifications   Includes the list of sensitive information types detected in the message.

  • IdMatch   Includes the sensitive information type that is detected, the exact matched content from the message, and the 150 characters before and after the matched sensitive information.

  • AttachOriginalMail   Includes the entire original message.

NoteNote:
The message ID is always included in the incident report.

This parameter is used to define a rule action.

IncidentReportOriginalMail

Optional

Microsoft.Exchange.MessagingPolicies.Rules.IncidentReportOriginalMail

The IncidentReportOriginalMail parameter specifies whether to include the original message with the incident report. This parameter is used together with the GenerateIncidentReport parameter. Valid values are:

  • IncludeOriginalMail

  • DoNotIncludeOriginalMail

The default value is DoNotIncludeOriginalMail.

This parameter is used to define a rule action.

ImportantImportant:
The functionality of this parameter is now managed by the IncidentReportContent parameter, and this parameter will be deprecated in the future. Adding the value AttachOriginalMail to the IncidentReportContent parameter is equivalent to setting this parameter to IncludeOriginalMail value. Even though this parameter is still functional, we recommend you use the IncidentReportContent parameter instead.

LogEventText

Optional

Microsoft.Exchange.Data.EventLogText

The LogEventText parameter specifies a message string to add to the event log entry for this rule.

This parameter is used to define a rule action.

ManagerAddresses

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ManagerAddresses parameter specifies a recipient. The rule is applied to messages where the specified recipient is the manager of the sender or the recipient. Whether it's the manager for the sender or the recipient is defined in the ManagerForEvaluatedUser parameter.

This parameter is used to define a rule condition.

ManagerForEvaluatedUser

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.EvaluatedUser

The ManagerForEvaluatedUser parameter specifies whether the sender or the recipient's manager should be evaluated. The specified user's manager attribute is compared with users specified in the ManagerAddresses parameter. Valid values include:

  • Recipient

  • Sender

Use this parameter together with the ManagerAddresses parameter.

This parameter is used to define a rule condition.

MessageContainsDataClassifications

Optional

System.Collections.Hashtable[]

The MessageContainsDataClassifications parameter specifies the sensitive information types to look for in the message body and any of the attachments. For a list of sensitive information types available, see Sensitive Information Types Inventory.

This parameter is used to define a rule condition.

MessageSizeOver

Optional

Microsoft.Exchange.Data.ByteQuantifiedSize

The MessageSizeOver parameter specifies a message size. The rule is applied to all messages that exceed the message size you specify for this parameter.

This parameter is used to define a rule condition.

MessageTypeMatches

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.MessageType

The MessageTypeMatches parameter specifies a message type. The rule is applied to all messages that match the message type you specify. Valid values include:

  • OOF   Auto-reply messages configured by the user

  • AutoForward   Messages automatically forwarded to an alternative recipient

  • Encrypted   Encrypted messages

  • Calendaring   Meeting requests and responses

  • PermissionControlled   Messages that have specific permissions configured

  • Voicemail   Voice mail messages forwarded by Unified Messaging service

  • Signed   Digitally signed messages

  • ApprovalRequest   Moderation request messages sent to moderators

  • ReadReceipt   Read receipts

This parameter is used to define a rule condition.

Mode

Optional

Microsoft.Exchange.MessagingPolicies.Rules.RuleMode

The Mode parameter specifies in which mode this rule will operate. Valid values include:

  • Audit   The rule is turned on, and what would have happened if the rule was enforced is logged in message tracking logs. Exchange doesn't take any action that impacts the delivery of the message.

  • AuditAndNotify   The rule is turned on, and it operates the same way it would in Audit mode, but notifications are also enabled.

  • Enforce   The rule is turned on, and all actions specified in the rule are taken.

The default value is Enforce.

ModerateMessageByManager

Optional

System.Boolean

The ModerateMessageByManager parameter specifies whether the message should be forwarded to the sender's manager for approval. To enable moderation by the sender's manager, set the value to $true.

This parameter is used to define a rule action.

ModerateMessageByUser

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The ModerateMessageByUser parameter specifies a recipient to forward the message to for approval.

This parameter is used to define a rule action.

Name

Optional

System.String

The Name parameter specifies the display name of the transport rule to be created. The length of the name can't exceed 64 characters.

NotifySender

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.NotifySenderType

The NotifySender parameter specifies how the sender of a message that goes against a DLP policy is notified. Valid values are:

  • NotifyOnly   Sender is notified, but the message is delivered normally.

  • RejectMessage   Message is rejected, and the sender is notified.

  • RejectUnlessFalsePositiveOverride   Message is rejected unless it's marked as a false positive by the sender.

  • RejectUnlessSilentOverride   Message is rejected unless the sender has chosen to override the policy restriction.

  • RejectUnlessExplicitOverride   This is the same as RejectUnlessSilentOverride, but the sender can also provide a justification for overriding the policy restriction.

If you specify any value other than NotifyOnly, you can provide a specific rejection status code and reason using the RejectMessageEnhancedStatusCode and RejectMessageReasonText parameters.

This action is used together with the MessageContainsDataClassifications condition. If you use this parameter, you must also specify the sensitive information types you want to check against using the MessageContainsDataClassifications parameter.

This parameter is used to define a rule action.

PrependSubject

Optional

Microsoft.Exchange.Data.SubjectPrefix

The PrependSubject parameter specifies a word or phrase to add to the beginning of the message subject.

NoteNote:
The rule will add the text as you specify in this parameter without adding spaces or other characters to separate it from the original subject. Consider ending the value you specify in this parameter with a colon (:) and a space, or at least a space, to separate it from the original subject.

This parameter is used to define a rule action.

Priority

Optional

System.Int32

The Priority parameter specifies the priority for this transport rule. Rules with a lower priority value are processed first. If you modify the priority of the rule, the position of the rule in the rule list changes to match the priority that you specified, and the Transport Rules agent increments all rules with a higher priority value. The value of this parameter must be greater than or equal to 0, and must be one less than the total number of transport rules in your organization. For example, if you configured 8 transport rules, you can set this parameter to any value from 0 through 7.

Quarantine

Optional

System.Boolean

The Quarantine parameter specifies whether the rules agent delivers the message to the quarantine mailbox specified in the Content Filtering configuration.

This parameter is used to define a rule action.

RecipientADAttributeContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The RecipientADAttributeContainsWords parameter specifies one or more words to check for in specific Active Directory attributes of the recipient. You can check against any of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

To specify a value for an Active Directory attribute, use the name of the Active Directory attribute followed by a colon and the words. For example, to look for the word Sales in the Department attribute, set this parameter to Department:Sales. If you want to specify multiple values for multiple attributes, separate them with commas. The rule will be applied if any of the specified attributes have the value specified.

This parameter is used to define a rule condition.

RecipientADAttributeMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The RecipientADAttributeMatchesPatterns parameter specifies one or more patterns to check for in the specified Active Directory attribute of the recipient. You can check against any of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

To specify a value for an Active Directory attribute, use the name of the Active Directory attribute followed by a colon and the pattern. If you want to specify multiple patterns for multiple attributes, separate them with commas. The rule will be applied if the values of any of the specified attributes match the specified patterns for that attribute.

This parameter is used to define a rule condition.

RecipientAddressContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The RecipientAddressContainsWords parameter specifies one or more words to check for in the recipient's email address.

This parameter is used to define a rule condition.

RecipientAddressMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The RecipientAddressMatchesPatterns parameter specifies a pattern to check the recipient address for.

This parameter is used to define a rule condition.

RecipientDomainIs

Optional

Microsoft.Exchange.Data.Word[]

The RecipientDomainIs parameter specifies the recipient's domain. The rule is applied to messages sent to recipients whose email addresses are in the specified domain.

This parameter is used to define a rule condition.

RecipientInSenderList

Optional

Microsoft.Exchange.Data.Word[]

This parameter applies to objects in the cloud-based service. It isn’t available for on-premises deployments.

The RecipientInSenderList parameter specifies the condition when a recipient is defined in a supervision list entry on the sender's mailbox. Supervision list entries perform the following functions:

  • They specify individual exceptions for the user in the closed campus supervision policy.

  • They identify the user as a victim in the anti-bullying policy.

To view the supervision list entries that are configured on a user's mailbox, run the Get-SupervisionListEntry command and specify the user's mailbox.

This parameter is used to define a rule condition.

RedirectMessageTo

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The RedirectMessageTo parameter specifies that the rule redirects the message to the specified recipient.

This parameter is used to define a rule action.

RejectMessageEnhancedStatusCode

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.RejectEnhancedStatus

The RejectMessageEnhancedStatusCode parameter specifies an enhanced status code to provide when rejecting messages. Valid values are 5.7.1 or between 5.7.1 and 5.7.999.

NoteNote:
The transport rule can add a custom rejection message. To further customize the delivery status notification (DSN), you need to create a custom DSN message using the New-SystemMessage cmdlet.

If an enhanced status code isn't specified, and only the RejectMessageReasonText parameter is used, the enhanced status code 5.7.1 is used.

This parameter is used to define a rule action.

RejectMessageReasonText

Optional

Microsoft.Exchange.Data.DsnText

The RejectMessageReasonText parameter specifies a reason that explains why the message was rejected.

NoteNote:
The transport rule can add a custom rejection message. To further customize the DSN, you need to create a custom DSN message using the New-SystemMessage cmdlet.

If a RejectMessageReasonText parameter value isn't specified, and an enhanced status code is specified by using the RejectMessageEnhancedStatusCode parameter, the default reason text "Delivery not authorized, message refused" is used.

This parameter is used to define a rule action.

RemoveHeader

Optional

Microsoft.Exchange.Data.HeaderName

The RemoveHeader parameter specifies an SMTP header name to be removed from the message.

This parameter is used to define a rule action.

RemoveOME

Optional

System.Boolean

The RemoveOME parameter specifies that a message and its attachments will be decrypted if they match the identified transport rule.

The default is $false.

RouteMessageOutboundConnector

Optional

Microsoft.Exchange.Configuration.Tasks.OutboundConnectorIdParameter

This parameter applies to objects in the cloud-based service. It isn’t available for on-premises deployments.

The RouteMessageOutboundConnector parameter specifies the connector to use for routing this message.

This parameter is used to define a rule action.

RouteMessageOutboundRequireTls

Optional

System.Boolean

The RouteMessageOutboundRequireTls parameter specifies that Transport Layer Security (TLS) encryption is required when routing this message outside your organization. Set this parameter to $true to require TLS.

This parameter is used to define a rule action.

RuleErrorAction

Optional

Microsoft.Exchange.MessagingPolicies.Rules.RuleErrorAction

The RuleErrorAction parameter specifies how the message should be handled if the rule processing can't be completed. Valid values are:

  • Ignore   The message is sent without completing the rule processing.

  • Defer   The message is deferred so the rules engine can attempt to process the message again.

The default value is Ignore.

RuleSubType

Optional

Microsoft.Exchange.MessagingPolicies.Rules.RuleSubType

The RuleSubType parameter specifies the type of this transport rule. Valid values are:

  • Dlp   Specifies that this rule is associated with a DLP policy.

  • None   Specifies that this is a regular transport rule.

SCLOver

Optional

Microsoft.Exchange.Data.SclValue

The SCLOver parameter specifies an SCL value. The rule is applied to messages with an SCL equal to or higher than the value specified. Valid SCL values are integers from 0 through 9, and -1. The value -1 specifies that the message is from a trusted source.

This parameter is used to define a rule condition.

SenderADAttributeContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The SenderADAttributeContainsWords parameter specifies one or more words to check for in specific Active Directory attributes of the sender. You can check against any of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

To specify a value for an Active Directory attribute, use the name of the Active Directory attribute followed by a colon and the words. For example, to look for the word Sales in the Department attribute, set this parameter to Department:Sales. If you want to specify multiple values for multiple attributes, separate them with commas. The rule will be applied if any of the specified attributes have the value specified.

This parameter is used to define a rule condition.

SenderADAttributeMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The SenderADAttributeMatchesPatterns parameter specifies one or more patterns to check for in the specified Active Directory attribute of the sender. You can check against any of the following Active Directory attributes:

  • DisplayName

  • FirstName

  • Initials

  • LastName

  • Office

  • PhoneNumber

  • OtherPhoneNumber

  • Email

  • Street

  • POBox

  • City

  • State

  • ZipCode

  • Country

  • UserLogonName

  • HomePhoneNumber

  • OtherHomePhoneNumber

  • PagerNumber

  • MobileNumber

  • FaxNumber

  • OtherFaxNumber

  • Notes

  • Title

  • Department

  • Company

  • Manager

  • CustomAttribute1 - CustomAttribute15

To specify a value for an Active Directory attribute, use the name of the Active Directory attribute followed by a colon and the pattern. If you want to specify multiple patterns for multiple attributes, separate them with commas. The rule will be applied if the values of any of the specified attributes match the specified patterns for that attribute.

This parameter is used to define a rule condition.

SenderAddressLocation

Optional

Microsoft.Exchange.MessagingPolicies.Rules.SenderAddressLocation

The SenderAddressLocation parameter specifies the fields to look in when evaluating sender addresses. Prior to Exchange Server 2013 Cumulative Update 1, transport rules only processed message headers when evaluating senders. With the addition of the SenderAddressLocation parameter, you can configure the rules to also examine the message envelope (the sender information sent with the MAIL FROM command in the SMTP transmission) when evaluating senders.

Valid values are:

  • Header   Only message headers are examined when evaluating senders.

  • Envelope   Only the message envelope is examined when evaluating senders.

  • HeaderOrEnvelope   Both message headers and the message envelope are examined when evaluating senders.

The default value is Header.

NoteNote:
By configuring this parameter, you can evaluate the message envelope for the following conditions and exceptions):
  • From

  • FromAddressContainsWords

  • FromAddressMatchesPatterns

  • FromMemberOf

  • SenderDomainIs

SenderDomainIs

Optional

Microsoft.Exchange.Data.Word[]

The SenderDomainIs parameter specifies the sender's domain. The rule is applied to messages received from senders whose email addresses are in the specified domain.

This parameter is used to define a rule condition.

SenderInRecipientList

Optional

Microsoft.Exchange.Data.Word[]

This parameter applies to objects in the cloud-based service. It isn’t available for on-premises deployments.

The SenderInRecipientList parameter specifies the condition when the sender is defined in a supervision list entry on a recipient's mailbox. Supervision list entries perform the following functions:

  • They specify individual exceptions for the user in the closed campus supervision policy.

  • They identify the user as a victim in the anti-bullying policy.

To view the supervision list entries that are configured on a user's mailbox, run the Get-SupervisionListEntry command and specify the user's mailbox.

This parameter is used to define a rule condition.

SenderIpRanges

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The SenderIpRanges parameter specifies the IP ranges to compare with the sender's IP address. The rule is applied if the IP address of the sender falls within one of the IP ranges specified in this parameter.

This parameter is used to define a rule condition.

SenderManagementRelationship

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.ManagementRelationship

The SenderManagementRelationship parameter specifies a relationship between the sender and the recipient. Valid values are:

  • Manager   The rule is applied if the sender is the manager of the recipient.

  • DirectReport   The rule is applied if the sender is a direct report of the recipient.

This parameter is used to define a rule condition.

SentTo

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The SentTo parameter specifies a recipient. The rule is applied to messages sent to the specified recipient.

This parameter is used to define a rule condition.

SentToMemberOf

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The SentToMemberOf parameter specifies a distribution group. The rule is applied to messages where any recipient is a member of the specified group.

NoteNote:
If the distribution group is removed after creation of the rule, no action is taken.

This parameter is used to define a rule condition.

SentToScope

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.ToUserScope

The SentToScope parameter specifies whether the message is sent to internal, external, or partner recipients. Valid values are:

  • InOrganization   The recipients are internal to your organization.

  • NotInOrganization   The recipients are outside your organization.

  • ExternalPartner   The recipients are in a partner organization.

  • ExternalNonPartner   The recipients are external to your organization, which isn't a partner organization.

This parameter is used to define a rule condition.

SetAuditSeverity

Optional

System.String

The SetAuditSeverity parameter specifies the severity level assigned to an incident report that's generated and the corresponding entry logged in the message tracking logs. You can specify one of the following values:

  • DoNotAudit   No audit entry is logged.

  • Low   The audit entry is assigned low severity.

  • Medium   The audit entry is assigned medium severity.

  • High   The audit entry is assigned high severity.

This parameter is used to define a rule action.

SetHeaderName

Optional

Microsoft.Exchange.Data.HeaderName

The SetHeaderName parameter specifies the SMTP header name to add or modify when the rule is applied. When the SetHeaderName parameter is used, you must also use the SetHeaderValue parameter to specify a value for the header.

This parameter is used to define a rule action.

SetHeaderValue

Optional

Microsoft.Exchange.Data.HeaderValue

The SetHeaderValue parameter specifies a value for the header specified in the SetHeaderName parameter.

This parameter is used to define a rule action.

SetSCL

Optional

Microsoft.Exchange.Data.SclValue

The SetSCL parameter modifies the SCL value of the message to the value specified. The SCL value can be a number from 0 through 9, or -1. The value -1 specifies that the message is from a trusted source.

This parameter is used to define a rule action.

SmtpRejectMessageRejectStatusCode

Optional

Microsoft.Exchange.Data.RejectStatusCode

The SmtpRejectMessageRejectStatusCode parameter specifies an enhanced status code to provide when rejecting a message.

This parameter is used to define a rule action.

SmtpRejectMessageRejectText

Optional

Microsoft.Exchange.Data.RejectText

The SmtpRejectMessageRejectText parameter specifies a text string to add to the rejection message. You must use this parameter with the SmtpRejectMessageRejectStatusCode parameter.

This parameter is used to define a rule action.

StopRuleProcessing

Optional

System.Boolean

The StopRuleProcessing parameter specifies whether the processing of subsequent rules should be stopped for this message.

This parameter is used to define a rule action.

SubjectContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The SubjectContainsWords parameter specifies words to look for in the message subject.

You can specify one or more words or phrases. When specifying more than one word or phrase, each word or phrase should be separated by a comma (,). When specifying a phrase that contains one or more spaces, you must enclose the phrase in quotation marks ("), for example:

Word1,"Phrase with spaces",word2.

This parameter is used to define a rule condition.

SubjectMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The SubjectMatchesPatterns parameter specifies text patterns to check for in the message subject.

This parameter is used to define a rule condition.

SubjectOrBodyContainsWords

Optional

Microsoft.Exchange.Data.Word[]

The SubjectOrBodyContainsWords parameter specifies words to look for in the message subject or body. The rule is applied if any of the words or phrases specified is found in the message subject or body.

You can specify one or more words or phrases. When specifying more than one word or phrase, each word or phrase should be separated by a comma (,). When specifying a phrase with one or more spaces, you must enclose the phrase in quotation marks ("), for example:

Word1,"Phrase with spaces",word2.

This parameter is used to define a rule condition.

SubjectOrBodyMatchesPatterns

Optional

Microsoft.Exchange.MessagingPolicies.Rules.Tasks.Pattern[]

The SubjectOrBodyMatchesPatterns parameter specifies text patterns to look for in the message subject or body. The rule is applied if the word specified is found in the message subject or body.

This parameter is used to define a rule condition.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

WithImportance

Optional

Microsoft.Exchange.Management.Tasks.Importance

The WithImportance parameter specifies message importance. The rule is applied to messages matching the specified importance. Valid values are:

  • High

  • Low

  • Normal

This parameter is used to define a rule condition.

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.

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.