Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Use the Add-ContentFilterPhrase cmdlet to define custom words for the Content Filter agent. A custom word is a word or phrase that the administrator sets for the Content Filter agent to evaluate the content of an e-mail message and apply appropriate filter processing.


Add-ContentFilterPhrase -Phrase <String> -Influence <GoodWord | BadWord> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-WhatIf [<SwitchParameter>]]

Detailed Description

To customize how the Content Filter agent assigns spam confidence level (SCL) ratings by identifying approved and unapproved words or phrases, you must first define custom words.

A required property of a custom word or phrase is the Influence parameter. The Influence parameter takes one of two values: GoodWord or BadWord.

A message that contains a custom word or phrase that has an Influence value of GoodWord is automatically assigned an SCL rating of 0 and therefore bypasses downstream spam processing. A message that contains a custom word or phrase that has an Influence value of BadWord is automatically assigned an SCL rating of 9 and therefore is treated as spam according to the policies that you have configured in Microsoft Exchange Server 2007.

You can enter custom words or phrases in any combination of uppercase and lowercase letters. However, when the Content Filter agent evaluates message content, it ignores case. The maximum number of custom words or phrases that can be created is 800.

For more information about how to modify the Content Filter agent, see Set-ContentFilterConfig.

To run the Add-ContentFilterPhrase cmdlet, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

To run the Add-ContentFilterPhrase cmdlet on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local Administrators group on that computer.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.


Parameter Required Type Description




Valid values are GoodWord and BadWord.




When you pass an argument, you must enclose the Phrase parameter in quotation marks if the phrase contains spaces as follows, for example: "This is a bad phrase". Custom phrases must be less than 257 characters in length.




The Confirm parameter 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 parameter.




To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the Active Directory directory service, include the DomainController parameter on the command. The DomainController parameter is not supported on computers that run the Edge Transport server role. The Edge Transport server role reads and writes only to the local ADAM instance.




The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, 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 parameter.

Input Types

Return Types


Error Description



The following code example shows an Add-ContentFilterPhrase command that defines a custom word that is the BadWord phrase, This is a bad phrase.

Add-ContentFilterPhrase -Phrase:"This is a bad phrase" -Influence:BadWord