Edit

Share via


New-InboxRule

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

Use the New-InboxRule cmdlet to create Inbox rules in mailboxes. Inbox rules process messages in the Inbox based on conditions and take actions such as moving a message to a specified folder or deleting a message.

You must have adequate permissions on the mailbox to create an Inbox rule.

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

Syntax

Identity

New-InboxRule
    [-Name] <String>
    [-AlwaysDeleteOutlookRulesBlob]
    [-ApplyCategory <MultiValuedProperty>]
    [-ApplySystemCategory <MultiValuedProperty>]
    [-BodyContainsWords <MultiValuedProperty>]
    [-Confirm]
    [-CopyToFolder <MailboxFolderIdParameter>]
    [-DeleteMessage <Boolean>]
    [-DeleteSystemCategory <MultiValuedProperty>]
    [-DomainController <Fqdn>]
    [-ExceptIfBodyContainsWords <MultiValuedProperty>]
    [-ExceptIfFlaggedForAction <String>]
    [-ExceptIfFrom <RecipientIdParameter[]>]
    [-ExceptIfFromAddressContainsWords <MultiValuedProperty>]
    [-ExceptIfHasAttachment <Boolean>]
    [-ExceptIfHasClassification <MessageClassificationIdParameter[]>]
    [-ExceptIfHeaderContainsWords <MultiValuedProperty>]
    [-ExceptIfMessageTypeMatches <InboxRuleMessageType>]
    [-ExceptIfMyNameInCcBox <Boolean>]
    [-ExceptIfMyNameInToBox <Boolean>]
    [-ExceptIfMyNameInToOrCcBox <Boolean>]
    [-ExceptIfMyNameNotInToBox <Boolean>]
    [-ExceptIfReceivedAfterDate <ExDateTime>]
    [-ExceptIfReceivedBeforeDate <ExDateTime>]
    [-ExceptIfRecipientAddressContainsWords <MultiValuedProperty>]
    [-ExceptIfSentOnlyToMe <Boolean>]
    [-ExceptIfSentTo <RecipientIdParameter[]>]
    [-ExceptIfSubjectContainsWords <MultiValuedProperty>]
    [-ExceptIfSubjectOrBodyContainsWords <MultiValuedProperty>]
    [-ExceptIfWithImportance <Importance>]
    [-ExceptIfWithinSizeRangeMaximum <ByteQuantifiedSize>]
    [-ExceptIfWithinSizeRangeMinimum <ByteQuantifiedSize>]
    [-ExceptIfWithSensitivity <Sensitivity>]
    [-FlaggedForAction <String>]
    [-Force]
    [-ForwardAsAttachmentTo <RecipientIdParameter[]>]
    [-ForwardTo <RecipientIdParameter[]>]
    [-From <RecipientIdParameter[]>]
    [-FromAddressContainsWords <MultiValuedProperty>]
    [-HasAttachment <Boolean>]
    [-HasClassification <MessageClassificationIdParameter[]>]
    [-HeaderContainsWords <MultiValuedProperty>]
    [-Mailbox <MailboxIdParameter>]
    [-MarkAsRead <Boolean>]
    [-MarkImportance <Importance>]
    [-MessageTypeMatches <InboxRuleMessageType>]
    [-MoveToFolder <MailboxFolderIdParameter>]
    [-MyNameInCcBox <Boolean>]
    [-MyNameInToBox <Boolean>]
    [-MyNameInToOrCcBox <Boolean>]
    [-MyNameNotInToBox <Boolean>]
    [-PinMessage <Boolean>]
    [-Priority <Int32>]
    [-ReceivedAfterDate <ExDateTime>]
    [-ReceivedBeforeDate <ExDateTime>]
    [-RecipientAddressContainsWords <MultiValuedProperty>]
    [-RedirectTo <RecipientIdParameter[]>]
    [-SendTextMessageNotificationTo <MultiValuedProperty>]
    [-SentOnlyToMe <Boolean>]
    [-SentTo <RecipientIdParameter[]>]
    [-SoftDeleteMessage <Boolean>]
    [-StopProcessingRules <Boolean>]
    [-SubjectContainsWords <MultiValuedProperty>]
    [-SubjectOrBodyContainsWords <MultiValuedProperty>]
    [-WhatIf]
    [-WithImportance <Importance>]
    [-WithinSizeRangeMaximum <ByteQuantifiedSize>]
    [-WithinSizeRangeMinimum <ByteQuantifiedSize>]
    [-WithSensitivity <Sensitivity>]
    [<CommonParameters>]

FromMessage

New-InboxRule
    -FromMessageId <MailboxStoreObjectIdParameter>
    [-ValidateOnly]
    [-AlwaysDeleteOutlookRulesBlob]
    [-Confirm]
    [-DomainController <Fqdn>]
    [-ExceptIfFromSubscription <AggregationSubscriptionIdentity[]>]
    [-Force]
    [-FromSubscription <AggregationSubscriptionIdentity[]>]
    [-Mailbox <MailboxIdParameter>]
    [-WhatIf]
    [<CommonParameters>]

Description

When you create, modify, remove, enable, or disable an Inbox rule in Exchange PowerShell, any client-side rules disabled by Microsoft Outlook and outbound rules are removed.

Parameters that are used for conditions also have corresponding exception parameters. When conditions specified in an exception are matched, the rule isn't applied to the message. Exception parameters begin with ExceptIf. For example, the exception parameter for SubjectOrBodyContainsWords is ExceptIfSubjectOrBodyContainsWords.

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

Examples

Example 1

New-InboxRule -Mailbox chris@contoso.com -Name "CheckActionRequired" -MyNameInToBox $true -FlaggedForAction Any -MarkImportance "High"

This example raises the message importance to High if the mailbox owner is in the To field. In addition, the message is flagged for action.

Parameters

-AlwaysDeleteOutlookRulesBlob

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The AlwaysDeleteOutlookRulesBlob switch hides a warning message when you use Outlook on the web (formerly known as Outlook Web App) or Exchange PowerShell to modify Inbox rules. You don't need to specify a value with this switch.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplyCategory

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ApplyCategory parameter specifies an action for the Inbox rule that applies the specified category to messages. A valid value is any text value that you want to define as a category. You can specify multiple categories separated by commas. If the value contains spaces, enclose the value in quotation marks (").

The categories that you specify for this parameter are defined in the mailbox (they aren't shared between mailboxes).

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplySystemCategory

Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ApplySystemCategory parameter specifies an action for the Inbox rule that applies the specified system category to messages. System categories are available to all mailboxes in the organization. Valid values are:

  • NotDefined
  • Bills
  • Document
  • DocumentPlus
  • Event
  • Family
  • File
  • Flight
  • FromContact
  • Important
  • LiveView
  • Lodging
  • MailingList
  • Newsletter
  • Photo
  • Purchase
  • RentalCar
  • RestaurantReservation
  • RetiredPromotion
  • ShippingNotification
  • Shopping
  • SocialUpdate
  • Travel
  • Video

You can specify multiple values separated by commas.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BodyContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The BodyContainsWords parameter specifies a condition for the Inbox rule that looks for the specified words or phrases in the body of messages.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding exception parameter to this condition is ExceptIfBodyContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.
  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CopyToFolder

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The CopyToFolder parameter specifies an action for the Inbox rule that copies messages to the specified mailbox folder. The syntax is MailboxID:\ParentFolder[\SubFolder].

For the value of MailboxID, you can use any value that uniquely identifies the mailbox. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Domain\Username
  • Email address
  • GUID
  • LegacyExchangeDN
  • SamAccountName
  • User ID or user principal name (UPN)

Example values for this parameter are john@contoso.com:\Marketing or John:\Inbox\Reports.

Parameter properties

Type:MailboxFolderIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeleteMessage

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The DeleteMessage parameter specifies an action for the Inbox rule that sends messages to the Deleted Items folder. Valid values are:

  • $true: Messages that match the conditions of the rule are moved to the Deleted Items folder.
  • $false: The action isn't used.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeleteSystemCategory

Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The DeleteSystemCategory parameter specifies an action for the Inbox rule that deletes the specified system category from messages. System categories are available to all mailboxes in the organization. Valid values are:

  • NotDefined
  • Bills
  • Document
  • DocumentPlus
  • Event
  • Family
  • File
  • Flight
  • FromContact
  • Important
  • LiveView
  • Lodging
  • MailingList
  • Newsletter
  • Photo
  • Purchase
  • RentalCar
  • RestaurantReservation
  • RetiredPromotion
  • ShippingNotification
  • Shopping
  • SocialUpdate
  • Travel
  • Video

You can specify multiple values separated by commas.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DomainController

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE

This parameter is available only in on-premises Exchange.

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

Parameter properties

Type:Fqdn
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfBodyContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfBodyContainsWords parameter specifies an exception for the Inbox rule that looks for the specified words or phrases in the body of messages.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding condition parameter to this exception is BodyContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfFlaggedForAction

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfFlaggedForAction parameter specifies an exception for the Inbox rule that looks messages with the specified message flag. Valid values are:

  • Any
  • Call
  • DoNotForward
  • FollowUp
  • ForYourInformation
  • Forward
  • NoResponseNecessary
  • Read
  • Reply
  • ReplyToAll
  • Review

The corresponding condition parameter to this exception is FlaggedForAction.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfFrom

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfFrom parameter specifies an exception for the Inbox rule that looks for the specified sender in messages. You can use any value that uniquely identifies the sender. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

The corresponding condition parameter to this exception is From.

Parameter properties

Type:

RecipientIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfFromAddressContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfFromAddressContainsWords parameter specifies an exception for the Inbox rule that looks for messages where the specified words are in the sender's email address.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding condition parameter to this exception is FromAddressContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfHasAttachment

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfHasAttachment parameter specifies an exception for the Inbox rule that looks for messages with attachments. Valid values are:

  • $true: The rule action isn't applied to messages that have attachments.
  • $false: The exception isn't used.

The corresponding condition parameter to this exception is HasAttachment.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfHasClassification

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfHasClassification parameter specifies an exception for the Inbox rule that looks for messages with the specified message classification. You can find message classifications by using the Get-MessageClassification cmdlet. You can specify multiple message classifications separated by commas.

The corresponding condition parameter to this exception is HasClassification.

Parameter properties

Type:

MessageClassificationIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfHeaderContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The HeaderContainsWords parameter specifies an exception for the Inbox rule that looks for the specified words or phrases in the header fields of messages.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding condition parameter to this exception is HeaderContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfMessageTypeMatches

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfMessageTypeMatches parameter specifies an exception for the Inbox rule that looks for messages of the specified type. Valid values are:

  • AutomaticReply
  • AutomaticForward
  • Encrypted
  • Calendaring
  • CalendaringResponse
  • PermissionControlled
  • Voicemail
  • Signed
  • ApprovalRequest
  • ReadReceipt
  • NonDeliveryReport

The corresponding condition parameter to this exception is MessageTypeMatches.

Parameter properties

Type:InboxRuleMessageType
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfMyNameInCcBox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfMyNameInCcBox parameter specifies an exception for the Inbox rule that looks for messages where the mailbox owner is in the Cc field. Valid values are:

  • $true: The rule action isn't applied to messages where the mailbox owner is in the Cc field.
  • $false: The exception isn't used.

The corresponding condition parameter to this exception is MyNameInCcBox.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfMyNameInToBox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfMyNameInToBox parameter specifies an exception for the Inbox rule that looks for messages where the mailbox owner is in the To field. Valid values are:

  • $true: The rule action isn't applied to messages where the mailbox owner is in the To field.
  • $false: The exception isn't used.

The corresponding condition parameter to this exception is MyNameInToBox.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfMyNameInToOrCcBox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfMyNameInToOrCcBox parameter specifies an exception for the Inbox rule that looks for messages where the mailbox owner is in the To or Cc fields Valid values are.

  • $true: The rule action isn't applied to messages where the mailbox owner is in the To or Cc fields.
  • $false: The exception isn't used.

The corresponding condition parameter to this exception is MyNameInToOrCcBox.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfMyNameNotInToBox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfMyNameNotInToBox parameter specifies an exception for the Inbox rule that looks for messages where the mailbox owner isn't in the To field. Valid values are:

  • $true: The rule action isn't applied to messages where the mailbox owner isn't in the To field.
  • $false: The exception isn't used.

The corresponding condition parameter to this exception is MyNameNotInToBox.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfReceivedAfterDate

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfReceivedAfterDate parameter specifies an exception for the Inbox rule that looks for messages received after the specified date.

Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format MM/dd/yyyy, enter 09/01/2018 to specify September 1, 2018. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2018 5:00 PM".

The corresponding condition parameter to this exception is ReceivedAfterDate.

Parameter properties

Type:ExDateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfReceivedBeforeDate

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfReceivedBeforeDate parameter specifies an exception for the Inbox rule that looks for messages received before the specified date.

Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format MM/dd/yyyy, enter 09/01/2018 to specify September 1, 2018. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2018 5:00 PM".

The corresponding condition parameter to this exception is ReceivedBeforeDate.

Parameter properties

Type:ExDateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfRecipientAddressContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfRecipientAddressContainsWords parameter specifies an exception for the Inbox rule that looks for messages where the specified words are in recipient email addresses.

You can specify multiple values separated by commas. The maximum length of this parameter is 255 characters.

The corresponding condition parameter to this exception is RecipientAddressContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfSentOnlyToMe

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfSentOnlyToMe parameter specifies an exception for the Inbox rule that looks for messages where the only recipient is the mailbox owner. Valid values are:

  • $true: The rule action isn't applied to messages where the mailbox owner is the only recipient.
  • $false: The exception isn't used.

The corresponding condition parameter to this exception is SentOnlyToMe.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfSentTo

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfSentTo parameter specifies an exception that looks for recipients in messages. You can use any value that uniquely identifies the recipient. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

The corresponding condition parameter to this exception is SentTo.

Parameter properties

Type:

RecipientIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfSubjectContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfSubjectContainsWords parameter specifies an exception for the Inbox rule that looks for the specified words or phrases in the Subject field of messages.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding condition parameter to this exception is SubjectContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfSubjectOrBodyContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfSubjectOrBodyContainsWords parameter specifies an exception for the Inbox rule that looks for the specified words or phrases in the Subject field or body of messages.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding condition parameter to this exception is SubjectOrBodyContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfWithImportance

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfWithImportance parameter specifies an exception for the Inbox rule that looks for messages with the specified importance level. Valid values are:

  • High
  • Normal
  • Low

The corresponding condition parameter to this exception is WithImportance.

Parameter properties

Type:Importance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfWithinSizeRangeMaximum

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfWithinSizeRangeMaximum parameter specifies part of an exception for the Inbox rule that looks for messages that smaller than specified maximum size.

When you enter a value, qualify the value with one of the following units:

  • B (bytes)
  • KB (kilobytes)
  • MB (megabytes)
  • GB (gigabytes)
  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values might be rounded up to the nearest kilobyte.

You need to use this parameter with the ExceptIfWithinSizeRangeMinimum parameter, and the value of this parameter must be greater than the value of ExceptIfWithinSizeRangeMinimum.

The corresponding condition parameter to this exception is WithinSizeRangeMaximum.

Parameter properties

Type:ByteQuantifiedSize
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfWithinSizeRangeMinimum

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfWithinSizeRangeMinimum parameter specifies part of an exception for the Inbox rule that looks for messages that are larger than the specified minimum size.

When you enter a value, qualify the value with one of the following units:

  • B (bytes)
  • KB (kilobytes)
  • MB (megabytes)
  • GB (gigabytes)
  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values might be rounded up to the nearest kilobyte.

You need to use this parameter with the ExceptIfWithinSizeRangeMaximum parameter, and the value of this parameter must be less than the value of ExceptIfWithinSizeRangeMaximum.

The corresponding condition parameter to this exception is WithinSizeRangeMinimum.

Parameter properties

Type:ByteQuantifiedSize
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExceptIfWithSensitivity

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ExceptIfWithSensitivity parameter specifies an exception for the Inbox rule that looks for messages with the specified sensitivity level. Valid values are:

  • Normal
  • Personal
  • Private
  • CompanyConfidential

The corresponding condition parameter to this exception is WithSensitivity.

Parameter properties

Type:Sensitivity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FlaggedForAction

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The FlaggedForAction parameter specifies a condition for the Inbox rule that looks for messages with the specified message flag. Valid values are:

  • Any
  • Call
  • DoNotForward
  • FollowUp
  • ForYourInformation
  • Forward
  • NoResponseNecessary
  • Read
  • Reply
  • ReplyToAll
  • Review

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.

A confirmation prompt warns you if the mailbox contains rules that were created by Outlook, because any client-side rules are removed by the actions of this cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForwardAsAttachmentTo

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ForwardAsAttachmentTo parameter specifies an action for the Inbox rule that forwards the message to the specified recipient as an attachment. You can use any value that uniquely identifies the recipient. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

Parameter properties

Type:

RecipientIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForwardTo

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ForwardTo parameter specifies an action for the Inbox rule that forwards the message to the specified recipient. You can use any value that uniquely identifies the recipient. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

Parameter properties

Type:

RecipientIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-From

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The From parameter specifies a condition for the Inbox rule that looks for the specified sender in messages. You can use any value that uniquely identifies the sender. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

The corresponding exception parameter to this condition is ExceptIfFrom.

Parameter properties

Type:

RecipientIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FromAddressContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The FromAddressContainsWords parameter specifies a condition for the Inbox rule that looks for messages where the specified words are in the sender's email address.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding exception parameter to this condition is ExceptIfFromAddressContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FromMessageId

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The FromMessageId parameter specifies the message that's used to create the Inbox rule. The rule is based on the properties of the message. You identify the message by its Base64-encoded StoreObjectId property value. For example:

  • MailboxId\StoreObjectId
  • StoreObjectId

When you use this parameter to create an Inbox rule, the following message properties are used in the rule:

  • Subject: The message subject is added to the SubjectContainsWords condition.
  • From: The message sender is added to the From condition.
  • To and Cc: Recipients in the To and Cc fields are added to the SentTo condition.

Parameter properties

Type:MailboxStoreObjectIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromMessage
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HasAttachment

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The HasAttachment parameter specifies a condition for the Inbox rule that looks for messages with attachments. Valid values are:

  • $true: The rule action is applied to messages that have attachments.
  • $false: The condition isn't used.

The corresponding exception parameter to this condition is ExceptIfHasAttachment.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HasClassification

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The HasClassification parameter specifies a condition for the Inbox rule that looks for messages with the specified message classification. You can find message classifications by using the Get-MessageClassification cmdlet. You can specify multiple message classifications separated by commas.

The corresponding exception parameter to this condition is ExceptIfHasClassification.

Parameter properties

Type:

MessageClassificationIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HeaderContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The HeaderContainsWords parameter specifies a condition for the Inbox rule that looks for the specified words or phrases in the header fields of messages.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding exception parameter to this condition is ExceptIfHeaderContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Mailbox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The Mailbox parameter specifies the mailbox that contains the Inbox rule. You can use any value that uniquely identifies the mailbox. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Domain\Username
  • Email address
  • GUID
  • LegacyExchangeDN
  • SamAccountName
  • User ID or user principal name (UPN)

Parameter properties

Type:MailboxIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MarkAsRead

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The MarkAsRead parameter specifies an action for the Inbox rule that marks messages as read. Valid values are:

  • $true: Messages that match the conditions of the rule are marked as read.
  • $false: The action isn't used.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MarkImportance

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The MarkImportance parameter specifies an action for the Inbox rule that marks messages with the specified importance flag. Valid values are:

  • Low
  • Normal
  • High

Parameter properties

Type:Importance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MessageTypeMatches

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The MessageTypeMatches parameter specifies a condition for the Inbox rule that looks for messages of the specified type. Valid values are:

  • AutomaticReply
  • AutomaticForward
  • Encrypted
  • Calendaring
  • CalendaringResponse
  • PermissionControlled
  • Voicemail
  • Signed
  • ApprovalRequest
  • ReadReceipt
  • NonDeliveryReport

The corresponding exception parameter to this condition is ExceptIfMessageTypeMatches.

Parameter properties

Type:InboxRuleMessageType
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MoveToFolder

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The MoveToFolder parameter specifies an action for the Inbox rule that moves messages to the specified mailbox folder. The syntax is MailboxID:\ParentFolder[\SubFolder].

For the value of MailboxID, you can use any value that uniquely identifies the mailbox. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Domain\Username
  • Email address
  • GUID
  • LegacyExchangeDN
  • SamAccountName
  • User ID or user principal name (UPN)

Example values for this parameter are john@contoso.com:\Marketing or John:\Inbox\Reports.

Parameter properties

Type:MailboxFolderIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MyNameInCcBox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The MyNameInCcBox parameter specifies a condition for the Inbox rule that looks for messages where the mailbox owner is in the Cc field. Valid values are:

  • $true: The rule action is applied to messages where the mailbox owner is in the Cc field.
  • $false: The condition isn't used.

The corresponding exception parameter to this condition is ExceptIfMyNameInCcBox.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MyNameInToBox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The MyNameInToBox parameter specifies a condition for the Inbox rule that looks for messages where the mailbox owner is in the To field. Valid values are:

  • $true: The rule action is applied to messages where the mailbox owner is in the To field.
  • $false: The condition isn't used.

The corresponding exception parameter to this condition is ExceptIfMyNameInToBox.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MyNameInToOrCcBox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The MyNameInToOrCcBox parameter specifies a condition for the Inbox rule that looks for messages where the mailbox owner is in the To or Cc fields Valid values are.

  • $true: The rule action is applied to messages where the mailbox owner is in the To or Cc fields.
  • $false: The condition isn't used.

The corresponding exception parameter to this condition is ExceptIfMyNameInToOrCcBox.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MyNameNotInToBox

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The MyNameNotInToBox parameter specifies a condition for the Inbox rule that looks for messages where the mailbox owner isn't in the To field. Valid values are:

  • $true: The rule action is applied to messages where the mailbox owner isn't in the To field.
  • $false: The condition isn't used.

The corresponding exception parameter to this condition is ExceptIfMyNameNotInToBox.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The Name parameter specifies the name of the Inbox rule. The maximum length is 512 characters. If the value contains spaces, enclose the value in quotation marks (").

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PinMessage

Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The PinMessage parameter specifies an action for the Inbox rule that pins messages to the top of the Inbox. Valid values are:

  • $true: Message that match the conditions of the rule are pinned to the top of the Inbox.
  • $false: The action isn't used.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Priority

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The Priority parameter specifies a priority for the Inbox rule that determines the order of rule processing. A lower integer value indicates a higher priority,

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReceivedAfterDate

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ReceivedAfterDate parameter specifies a condition for the Inbox rule that looks for messages received after the specified date.

Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format MM/dd/yyyy, enter 09/01/2018 to specify September 1, 2018. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2018 5:00 PM".

The corresponding exception parameter to this condition is ExceptIfReceivedAfterDate.

Parameter properties

Type:ExDateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReceivedBeforeDate

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ReceivedBeforeDate parameter specifies a condition for the Inbox rule that looks for messages received before the specified date.

Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format MM/dd/yyyy, enter 09/01/2018 to specify September 1, 2018. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2018 5:00 PM".

The corresponding exception parameter to this condition is ExceptIfReceivedBeforeDate.

Parameter properties

Type:ExDateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecipientAddressContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The RecipientAddressContainsWords parameter specifies a condition for the Inbox rule that looks for messages where the specified words are in recipient email addresses.

You can specify multiple values separated by commas. The maximum length of this parameter is 255 characters.

The corresponding exception parameter to this condition is ExceptIfRecipientAddressContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RedirectTo

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The RedirectTo parameter specifies an action for the Inbox rule that redirects the message to the specified recipient. You can use any value that uniquely identifies the recipient. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

Parameter properties

Type:

RecipientIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SendTextMessageNotificationTo

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE

This parameter is available only in on-premises Exchange.

The SendTextMessageNotificationTo parameter specifies an action for the Inbox rule that send a text message notification to the specified telephone number.

You can specify multiple values separated by commas.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SentOnlyToMe

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The SentOnlyToMe parameter specifies a condition for the Inbox rule that looks for messages where the only recipient is the mailbox owner. Valid values are:

  • $true: The rule action is applied to messages where the mailbox owner is the only recipient.
  • $false: The condition isn't used.

The corresponding exception parameter to this condition is ExceptIfSentOnlyToMe.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SentTo

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The SentTo parameter specifies a condition for the Inbox rule that looks for messages with the specified recipients. You can use any value that uniquely identifies the recipient. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

The corresponding exception parameter to this condition is ExceptIfSentTo.

Parameter properties

Type:

RecipientIdParameter[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SoftDeleteMessage

Applicable: Exchange Online

This parameter is available only in the cloud-based service.

{{ Fill SoftDeleteMessage Description }}

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StopProcessingRules

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The StopProcessingRules parameter specifies an action for the Inbox rule that stops processing additional rules if the conditions of this Inbox rule are met. Valid values are:If set to $true, the StopProcessingRules parameter instructs Exchange to stop processing additional rules if the conditions of this Inbox rule are met.

  • $true: Stop processing more rules.
  • $false: The action isn't used (continue processing more rules after this one).

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubjectContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The SubjectContainsWords parameter specifies a condition for the Inbox rule that looks for the specified words or phrases in the Subject field of messages.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding exception parameter to this condition is ExceptIfSubjectContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubjectOrBodyContainsWords

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The SubjectOrBodyContainsWords parameter specifies a condition for the Inbox rule that looks for the specified words or phrases in the Subject field or body of messages.

To specify multiple words or phrases, use the following syntax: Word1,"Phrase with spaces",word2,...wordN. Don't use leading or trailing spaces.

The maximum length of this parameter is 255 characters.

The corresponding exception parameter to this condition is ExceptIfSubjectOrBodyContainsWords.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ValidateOnly

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The ValidateOnly switch specifies whether to evaluate the potential success or failure of the command without making changes. You don't need to specify a value with this switch.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromMessage
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WithImportance

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The WithImportance parameter specifies a condition for the Inbox rule that looks for messages with the specified importance level. Valid values are:

  • High
  • Normal
  • Low

The corresponding exception parameter to this condition is ExceptIfWithImportance.

Parameter properties

Type:Importance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WithinSizeRangeMaximum

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The WithinSizeRangeMaximum parameter specifies part of a condition for the Inbox rule that looks for messages that are smaller than specified maximum size.

When you enter a value, qualify the value with one of the following units:

  • B (bytes)
  • KB (kilobytes)
  • MB (megabytes)
  • GB (gigabytes)
  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values might be rounded up to the nearest kilobyte.

You need to use this parameter with the WithinSizeRangeMinimum parameter, and the value of this parameter must be greater than the value of WithinSizeRangeMinimum.

The corresponding exception parameter to this condition is ExceptIfWithinSizeRangeMaximum.

Parameter properties

Type:ByteQuantifiedSize
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WithinSizeRangeMinimum

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The WithinSizeRangeMinimum parameter specifies part of a condition for the Inbox rule that looks for messages that are larger than the specified minimum size.

When you enter a value, qualify the value with one of the following units:

  • B (bytes)
  • KB (kilobytes)
  • MB (megabytes)
  • GB (gigabytes)
  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values might be rounded up to the nearest kilobyte.

You need to use this parameter with the WithinSizeRangeMaximum parameter, and the value of this parameter must be less than the value of WithinSizeRangeMaximum.

The corresponding exception parameter to this condition is ExceptIfWithinSizeRangeMinimum.

Parameter properties

Type:ByteQuantifiedSize
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WithSensitivity

Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online

The WithSensitivity parameter specifies a condition for the Inbox rule that looks for messages with the specified sensitivity level. Valid values are:

  • Normal
  • Personal
  • Private
  • CompanyConfidential

The corresponding exception parameter to this condition is ExceptIfWithSensitivity.

Parameter properties

Type:Sensitivity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Input types

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.

Outputs

Output types

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.