Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-11-19

Use the New-OutlookProtectionRule cmdlet to create a Microsoft Outlook protection rule.

Caution:
Outlook protection rules created without a condition apply to all messages.

Syntax

New-OutlookProtectionRule -Name <String> -ApplyRightsProtectionTemplate <RmsTemplateIdParameter> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-Enabled <$true | $false>] [-Force <SwitchParameter>] [-FromDepartment <String[]>] [-Organization <OrganizationIdParameter>] [-Priority <Int32>] [-SentTo <RecipientIdParameter[]>] [-SentToScope <All | InOrganization>] [-UserCanOverride <$true | $false>] [-WhatIf [<SwitchParameter>]]

Detailed Description

Outlook protection rules are administrator-created rules applied before a user sends a message using Outlook. Outlook inspects message content and protects messages by applying Active Directory Rights Management Services (AD RMS) rights templates.

For more information, see Understanding Outlook Protection Rules.

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 "Rights protection" entry in the Messaging Policy and Compliance Permissions topic.

Parameters

Parameter Required Type Description

ApplyRightsProtectionTemplate

Required

Microsoft.Exchange.Configuration.Tasks.RmsTemplateIdParameter

The ApplyRightsProtectionTemplate parameter specifies the AD RMS template to apply to the message. An AD RMS template can be specified using the template name. Use the Get-RMSTemplate cmdlet to retrieve templates from your AD RMS server.

Name

Required

System.String

The Name parameter specifies a name for the rule.

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.

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.

Enabled

Optional

System.Boolean

The Enabled parameter specifies whether the Outlook protection rules are enabled. New Outlook protection rules are enabled by default. To create a rule without enabling it, set the Enabled parameter to $false.

Force

Optional

System.Management.Automation.SwitchParameter

The Force switch specifies whether to suppress the confirmation prompt used to warn the administrator when rules are created without any conditions. Rules without any conditions specified apply to all messages. The Force switch doesn't require a value.

FromDepartment

Optional

System.String[]

The FromDepartment parameter specifies the sender's department as a condition. The user's department property is compared with the value specified.

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

The Organization parameter is reserved for internal Microsoft use.

Priority

Optional

System.Int32

The Priority parameter specifies whether to set the order of processing of Outlook protection rules. Rules with a lower priority value are executed first.

SentTo

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The SentTo parameter specifies one or more recipients as a rule condition. The identity of recipients in the organization or the SMTP address of external recipients can be specified.

The SentTo parameter doesn't accept wildcard characters. When multiple recipients are specified, messages sent to any of the specified recipients are considered a match.

SentToScope

Optional

Microsoft.Exchange.Management.OutlookProtectionRules.ToUserScope

The SentToScope parameter specifies the message scope as a condition. You can use one of the following values:

  • InOrganization   This value is for messages sent to recipients within the organization.

  • All   This value is for messages sent to all recipients.

UserCanOverride

Optional

System.Boolean

The UserCanOverride parameter specifies whether users can override actions taken by Outlook Protection Rules. By default, users can override actions taken by Outlook protection rules. When set to $false, the UserCanOverride parameter prevents the user from overriding the rule when sending the message.

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.

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.

Examples

EXAMPLE 1

This example applies the AD RMS template Template-Contoso to messages sent to the SMTP address Joe@contoso.com.

Copy Code
New-OutlookProtectionRule -Name "Project Contoso" -SentTo Joe@contoso.com -ApplyRightsProtectionTemplate "Template-Contoso"