Applies to: Exchange Server 2013, Exchange Online

Topic Last Modified: 2012-09-18

Use the Get-InboxRule cmdlet to view Inbox rule properties. Inbox rules are used to process messages in the Inbox based on conditions specified and take actions such as moving a message to a specified folder or deleting a message.

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

Syntax

Get-InboxRule [-Identity <InboxRuleIdParameter>] [-DescriptionTimeFormat <String>] [-DescriptionTimeZone <ExTimeZoneValue>] [-DomainController <Fqdn>] [-Mailbox <MailboxIdParameter>]

Examples

EXAMPLE 1

This example retrieves all Inbox rules for the mailbox Joe@Contoso.com.

Copy Code
Get-InboxRule -Mailbox Joe@Contoso.com

EXAMPLE 2

This example retrieves the Inbox rule ReceivedLastYear from the mailbox joe@contoso.com on which the ReceivedBeforeDate parameter was set when the rule was created. The DescriptionTimeFormat and DescriptionTimeZone parameters are used in this example to specify formatting of the time and the time zone used in the rule's Description property.

Copy Code
Get-InboxRule "ReceivedLastYear" -Mailbox joe@contoso.com -DescriptionTimeFormat "mm/dd/yyyy" -DescriptionTimeZone "Pacific Standard Time"

Detailed Description

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 "Inbox rules" entry in the Recipients Permissions topic.

Parameters

Parameter Required Type Description

DescriptionTimeFormat

Optional

System.String

The DescriptionTimeFormat parameter specifies the format in which time values are returned in the rule description. You must use standard time value format settings, for example:

mm/dd/yyyy, where mm is the 2-digit month, dd is the 2-digit day, and yyyy is the 4-digit year.

DescriptionTimeZone

Optional

Microsoft.Exchange.Data.Storage.Management.ExTimeZoneValue

The DescriptionTimeZone parameter specifies the format in which the time zone for time values is returned in the rule description. Use a valid Microsoft Windows time zone name.

You can use the Windows PowerShell command-line interface to retrieve time zone names from the registry, for example:

$timezone = Get-ChildItem "HKLM :\Software\Microsoft\Windows NT\CurrentVersion\Time zones" | For-Each {Get-ItemProperty $_.PSPath}; $timezone | Format-Table pschildname,display -auto

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.

Identity

Optional

Microsoft.Exchange.Configuration.Tasks.InboxRuleIdParameter

The Identity parameter specifies the identity of an Inbox rule.

Mailbox

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The Mailbox parameter specifies the mailbox to which the Inbox rule belongs. You can use one of the following values:

  • GUID

  • Distinguished name (DN)

  • Domain\Account

  • User principal name (UPN)

  • LegacyExchangeDN

  • SmtpAddress

  • Alias

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.

Return 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.