New-HostedContentFilterPolicy
Applies to: Exchange Online
Topic Last Modified: 2012-10-31
This cmdlet is available only in the cloud-based service.
Use the New-HostedContentFilterPolicy cmdlet to create content filter policies in your cloud-based organization.
For information about the parameter sets in the Syntax section below, see Syntax.
New-HostedContentFilterPolicy -Name <String> [-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>] [-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>] [-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>] [-Organization <OrganizationIdParameter>] [-QuarantineRetentionPeriod <Int32>] [-RedirectToRecipients <MultiValuedProperty>] [-RegionBlockList <MultiValuedProperty>] [-SpamAction <MoveToJmf | AddXHeader | ModifySubject | Redirect | Delete | Quarantine>] [-TestModeAction <None | AddXHeader | BccMessage>] [-TestModeBccToRecipients <MultiValuedProperty>] [-WhatIf [<SwitchParameter>]]
This example creates a 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.
New-HostedContentFilterPolicy -Name "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 |
|---|---|---|---|
| Name | Required | System.String | The Name parameter specifies a unique name for 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 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 This parameter is only useful if the |
| EnableEndUserSpamNotifications | Optional | System.Boolean | The EnableEndUserSpamNotification parameter enables for disables sending end-user spam quarantine notification messages. Valid input for this parameter is 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 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 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 3 and 30. 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. Valid values for this parameter are |
| 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:
The default value is |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 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. |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 The value you specify must contain less than 256 characters If the value contains spaces, enclose the value in quotation marks ("). |
| Organization | Optional | Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter | The Organization 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 14. The default value is 14. |
| 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 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 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:
The default value is |
| 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
The default value is |
| 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 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.
