Export (0) Print
Expand All
Expand Minimize

Set-HostedContentFilterPolicy

Exchange 2013
 

Applies to: Exchange Online Protection, Exchange Online

Topic Last Modified: 2013-10-21

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

Use the Set-HostedContentFilterPolicy cmdlet to modify the settings of content filter policies in your cloud-based organization.

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

Set-HostedContentFilterPolicy -Identity <HostedContentFilterPolicyIdParameter> [-AddXHeaderValue <String>] [-AdminDisplayName <String>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-DownloadLink <$true | $false>] [-EnableEndUserSpamNotifications <$true | $false>] [-EnableLanguageBlockList <$true | $false>] [-EnableRegionBlockList <$true | $false>] [-EndUserSpamNotificationCustomFromAddress <SmtpAddress>] [-EndUserSpamNotificationCustomFromName <String>] [-EndUserSpamNotificationCustomSubject <String>] [-EndUserSpamNotificationFrequency <Int32>] [-EndUserSpamNotificationLanguage <Default | English | French | German | Italian | Japanese | Spanish | Korean | Portuguese | Russian | ChineseSimplified | ChineseTraditional | Amharic | Arabic | Bulgarian | BengaliIndia | Catalan | Czech | Cyrillic | Danish | Greek | Estonian | Basque | Farsi | Finnish | Filipino | Galician | Gujarati | Hebrew | Hindi | Croatian | Hungarian | Indonesian | Icelandic | Kazakh | Kannada | Lithuanian | Latvian | Malayalam | Marathi | Malay | Dutch | NorwegianNynorsk | Norwegian | Oriya | Polish | PortuguesePortugal | Romanian | Slovak | Slovenian | SerbianCyrillic | Serbian | Swedish | Swahili | Tamil | Telugu | Thai | Turkish | Ukrainian | Urdu | Vietnamese>] [-EndUserSpamNotificationLimit <Int32>] [-FalsePositiveAdditionalRecipients <MultiValuedProperty>] [-HighConfidenceSpamAction <MoveToJmf | AddXHeader | ModifySubject | Redirect | Delete | Quarantine>] [-IgnoreDehydratedFlag <SwitchParameter>] [-IncreaseScoreWithBizOrInfoUrls <Off | On | Test>] [-IncreaseScoreWithImageLinks <Off | On | Test>] [-IncreaseScoreWithNumericIps <Off | On | Test>] [-IncreaseScoreWithRedirectToOtherPort <Off | On | Test>] [-LanguageBlockList <MultiValuedProperty>] [-MakeDefault <SwitchParameter>] [-MarkAsSpamBulkMail <Off | On | Test>] [-MarkAsSpamEmbedTagsInHtml <Off | On | Test>] [-MarkAsSpamEmptyMessages <Off | On | Test>] [-MarkAsSpamFormTagsInHtml <Off | On | Test>] [-MarkAsSpamFramesInHtml <Off | On | Test>] [-MarkAsSpamFromAddressAuthFail <Off | On | Test>] [-MarkAsSpamJavaScriptInHtml <Off | On | Test>] [-MarkAsSpamNdrBackscatter <Off | On | Test>] [-MarkAsSpamObjectTagsInHtml <Off | On | Test>] [-MarkAsSpamSensitiveWordList <Off | On | Test>] [-MarkAsSpamSpfRecordHardFail <Off | On | Test>] [-MarkAsSpamWebBugsInHtml <Off | On | Test>] [-ModifySubjectValue <String>] [-Name <String>] [-QuarantineRetentionPeriod <Int32>] [-RedirectToRecipients <MultiValuedProperty>] [-RegionBlockList <MultiValuedProperty>] [-SpamAction <MoveToJmf | AddXHeader | ModifySubject | Redirect | Delete | Quarantine>] [-TestModeAction <None | AddXHeader | BccMessage>] [-TestModeBccToRecipients <MultiValuedProperty>] [-WhatIf [<SwitchParameter>]]

This example modifies the content filter policy named Contoso Content Filter Policy with the following settings:

  • Redirect messages that are definitely spam or that may be spam to chris@contoso.com.

  • Send copies of spam quarantine false positive submissions to michelle@contoso.com.

Set-HostedContentFilterPolicy -Identity "Contoso Content Filter Policy" -HighConfidenceSpamAction Redirect -SpamAction Redirect -RedirectToRecipients chris@contoso.com -FalsePositiveAdditionalRecipients michelle@contoso.com

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 "Anti-spam" entry in the Feature permissions in Exchange Online topic.

 

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.HostedContentFilterPolicyIdParameter

The Identity parameter specifies the content filter policy you want to modify. You can use any value that uniquely identifies the policy. For example, you can specify the

name, GUID or distinguished name (DN) of the content filter policy.

AddXHeaderValue

Optional

System.String

The AddXHeaderValue parameter specifies the X-header value to add to spam messages when an action parameter is set to the value AddXHeader. The action parameters that use the value of AddXHeaderValue are HighConfidenceSpamAction, and SpamAction. Note that when the TestModeAction parameter is set to AddXHeader, the X-header value X-CustomSpam: This message was filtered by the custom spam filter option is added to the message.

An X-header is a user-defined, unofficial header field that exists in the message header. X-headers aren't specifically mentioned in RFC 2822, but the use of an undefined header field starting with X- has become an accepted way to add unofficial header fields to a message. The value you specify must contain less than 256 characters, and it can't contain spaces.

AdminDisplayName

Optional

System.String

The AdminDisplayName parameter specifies a description for the content filter policy. If the value contains spaces, enclose the value in quotation marks (").

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

This parameter is reserved for internal Microsoft use.

DownloadLink

Optional

System.Boolean

The DownloadLink parameter shows or hides a link in end-user spam notification messages to download the Junk E-mail Reporting Tool plugin for Microsoft Outlook. Valid input for this parameter is $true or $false. The default value is $false.

This parameter is only useful if the EnableEndUserSpamNotifications parameter is set to $true.

EnableEndUserSpamNotifications

Optional

System.Boolean

The EnableEndUserSpamNotification parameter enables for disables sending end-user spam quarantine notification messages. Valid input for this parameter is $true or $false. The default value is $false.

End-user spam notification messages periodically alert users when they have messages in the quarantine. When you enable end-user spam notifications, you may also specify values for the EndUserSpamNotificationCustomFromAddress, EndUserSpamNotificationCustomFromName, and EndUserSpamNotificationCustomSubject parameters.

EnableLanguageBlockList

Optional

System.Boolean

The EnableLanguageBlockList parameter enables or disables blocking email messages that are written in specific languages, regardless of the message contents. Valid input for this parameter is $true or $false. The default value is $false.

When you enable the language block list, you may specify one or more languages by using the LanguageBlockList parameter.

EnableRegionBlockList

Optional

System.Boolean

The EnableRegionBlockList parameter enables or disables blocking email messages that are sent from specific countries or regions, regardless of the message contents. Valid input for this parameter is $true or $false. The default value is $false.

When you enable the region block list, you may specify one or more regions by using the RegionBlockList parameter.

EndUserSpamNotificationCustomFromAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The EndUserSpamNotificationCustomFromAddress parameter specifies a custom From address for end-user spam notification messages. Valid input for this parameter is an SMTP email address.

EndUserSpamNotificationCustomFromName

Optional

System.String

The EndUserSpamNotificationCustomFromName parameter specifies a custom display name in the From field for end-user spam notification messages. If the value includes spaces, enclose the value in quotation marks (").

EndUserSpamNotificationCustomSubject

Optional

System.String

The EndUserSpamNotificationCustomSubject parameter specifies a custom subject for end-user spam notification messages. If the value includes spaces, enclose the value in quotation marks (").

EndUserSpamNotificationFrequency

Optional

System.Int32

The EndUserSpamNotificationFrequency parameter specifies the repeat interval in days that end-user spam notification messages are sent. Valid input for this parameter is an integer between 1 and 15. The default value is 3.

EndUserSpamNotificationLanguage

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.EsnLanguage

The EndUserSpamNotificationLanguage parameter specifies the language of end-user spam notification messages. The default value is Default. This means the default language of end-user spam notification messages is the default language of the cloud-based organization.

EndUserSpamNotificationLimit

Optional

System.Int32

This parameter is reserved for internal Microsoft use.

FalsePositiveAdditionalRecipients

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter is reserved for internal Microsoft use.

HighConfidenceSpamAction

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringAction

The HighConfidenceSpamAction parameter specifies the action to take when a message is very likely to be spam. Valid values for this parameter are:

  • AddXHeader: The value specified by the AddXHeaderValue parameter is added to the message.

  • Delete

  • ModifySubject: The value specified by the ModifySubjectValue parameter is prepended to the subject of the message.

  • MoveToJmf: Move the message to the user's Junk E-mail Folder.

  • Quarantine: Move the message to the quarantine.

  • Redirect: Redirect the message to the recipients specified by the RedirectToRecipients parameter.

The default value is Quarantine.

IgnoreDehydratedFlag

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

IncreaseScoreWithBizOrInfoUrls

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The IncreaseScoreWithBizOrInfoUrls parameter increases the spam score of messages that contain links to .biz or .info domains. Valid values for this parameter are Off, On or Test. The default value is Off.

IncreaseScoreWithImageLinks

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The IncreaseScoreWithImageLinks parameter increases the spam score of messages that contain image links to remote websites. Valid values for this parameter are Off, On or Test. The default value is Off.

IncreaseScoreWithNumericIps

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The IncreaseScoreWithNumericIps parameter increases the spam score of messages that contain links to IP addresses. Valid values for this parameter are Off, On or Test. The default value is Off.

IncreaseScoreWithRedirectToOtherPort

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The IncreaseScoreWithRedirectToOtherPort parameter increases the spam score of messages that contain links that redirect to other TCP ports. Valid values for this parameter are Off, On or Test. The default value is Off.

LanguageBlockList

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The LanguageBlockList parameter specifies the languages to block when messages are blocked based on their language. Valid input for this parameter is a supported ISO 639-1 lowercase two-letter language code. You can specify multiple values separated by commas. This parameter is only use when the EnableRegionBlockList parameter is set to $true.

A reference for two-letter language codes is available at the Library of Congress website: ISO 639-2 Code. Note that not all possible language codes are available as input for this parameter.

MakeDefault

Optional

System.Management.Automation.SwitchParameter

The MakeDefault switch makes the specified content filter policy the default content filter policy. You don't have to specify a value with this switch.

MarkAsSpamBulkMail

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamBulkMail parameter classifies the message as spam when the message is identified as a bulk email message. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamEmbedTagsInHtml

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamEmbedTagsInHtml parameter classifies the message as spam when the message contains HTML <embed> tags. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamEmptyMessages

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamEmptyMessages parameter classifies the message as spam when the message is empty. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamFormTagsInHtml

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamFormTagsInHtml parameter classifies the message as spam when the message contains HTML <form> tags. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamFramesInHtml

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamFramesInHtml parameter classifies the message as spam when the message contains HTML <frame> or <iframe> tags. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamFromAddressAuthFail

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamFromAddressAuthFail parameter classifies the message as spam when Sender ID filtering encounters a hard fail. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamJavaScriptInHtml

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamJavaScriptInHtml parameter classifies the message as spam when the message contains JavaScript or VBScript. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamNdrBackscatter

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamNdrBackscatter parameter classifies the message as spam when the message is a non-delivery report (NDR) to a forged sender. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamObjectTagsInHtml

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamObjectTagsInHtml parameter classifies the message as spam when the message contains HTML <object> tags. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamSensitiveWordList

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamSensitiveWordList parameter classifies the message as spam when the message contains words from the sensitive words list. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamSpfRecordHardFail

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamFromAddressAuthFail parameter classifies the message as spam when Sender Policy Framework (SPF) record checking encounters a hard fail. Valid values for this parameter are Off, On or Test. The default value is Off.

MarkAsSpamWebBugsInHtml

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringOption

The MarkAsSpamWebBugsInHtml parameter classifies the message as spam when the message contains web bugs. Valid values for this parameter are Off, On or Test. The default value is Off.

ModifySubjectValue

Optional

System.String

The ModifySubjectValue parameter specifies the text to prepend to the existing subject of spam messages when an action parameter is set to the value ModifySubject. The action parameters that use the value of ModifySubjectValue are HighConfidenceSpamAction and SpamAction.

The value you specify must contain less than 256 characters If the value contains spaces, enclose the value in quotation marks (").

Name

Optional

System.String

This parameter is reserved for internal Microsoft use.

QuarantineRetentionPeriod

Optional

System.Int32

The QuarantineRetentionPeriod parameter specifies the length of time in days that spam messages remain in the quarantine. Valid input for this parameter is an integer between 1 and 15. The default value is 15.

RedirectToRecipients

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The RedirectToRecipients parameter specifies the replacement recipients in spam messages when an action parameter is set to the value Redirect. The action parameters that use the value of RedirectToRecipients are HighConfidenceSpamAction and SpamAction.

Valid input for this parameter is an email address. Separate multiple email addresses with commas.

RegionBlockList

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The RegionBlockList parameter specifies the region to block when messages are blocked based on their source region. Valid input for this parameter is a supported ISO 3166-1 uppercase two-letter country code. You can specify multiple values separated by commas. This parameter is only used when the EnableRegionBlockList parameter is set to $true.

A reference for two-letter country codes is available at the International Organization for Standardization (ISO) website: ISO 3166-1 decoding table. Note that not all possible country codes are available as input for this parameter.

SpamAction

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringAction

The SpamAction parameter specifies the action to take on messages that may be spam. Valid values for this parameter are:

  • AddXHeader: The value specified by the AddXHeaderValue parameter is added to the message.

  • Delete

  • ModifySubject: The value specified by the ModifySubjectValue parameter is prepended to the subject of the message.

  • MoveToJmf: Move the message to the user's Junk E-mail Folder.

  • Quarantine

  • Redirect: Redirect the message to the recipients specified by the RedirectToRecipients parameter.

The default value is Quarantine.

TestModeAction

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.SpamFilteringTestModeAction

The TestModeAction parameter specifies the additional action to take on messages that match any of the IncreaseScoreWith or MarkAsSpam parameters that are set to the value Test. Valid values for this parameter are:

  • None

  • AddXHeader: The X-header value X-CustomSpam: This message was filtered by the custom spam filter option is added to the message.

  • BccMessage: Redirect the message to the recipients specified by the TestModeBccToRecipients parameter.

The default value is None.

TestModeBccToRecipients

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The TestModeBccToRecipients parameter specifies the blind carbon copy recipients to add to spam messages when the TestModeAction action parameter is set to the value BccMessage.

Valid input for this parameter is an email address. Separate multiple email addresses with commas.

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.

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.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft