Outlook Web App > For Exchange Online Administrators > Supervision Policies > Configure the Bad Words Supervision Policy >

Configure the Bad Words Supervision Policy in Windows PowerShell

Applies to: Live@edu

Topic Last Modified: 2011-03-19

We recommend that you use the Exchange Control Panel to configure the bad words supervision policy, but you can also use Windows PowerShell.

Before you begin

To learn how to install and configure Windows PowerShell and connect to the service, see Use Windows PowerShell in Exchange Online.

Turn on the policy and specify the list of bad words

If you turn on the bad words policy and don't specify any bad words, all messages in your organization will be blocked. Therefore, make sure to specify bad words when you turn on the policy.

Also, you can't remove individual entries or change entries on the list of bad words in Windows PowerShell. You have to replace the entire list.

Run the following command:

Set-SupervisionPolicy -BadWordsPolicyEnabled $true
-BadWordsList <word1,word2,...>

Separate words or phrases with commas. Enclose values that contain spaces or special characters in double quotation marks, as follows, for example:

Set-SupervisionPolicy -BadWordsPolicyEnabled $true -BadWordsList bad,naughty,awful,"second rate","stinkin'",sour,terrible

Turn off the policy

Run the following command:

Set-SupervisionPolicy -BadWordsPolicyEnabled $false

View the current settings for the policy

Run the following command:

Get-SupervisionPolicy -DisplayDetails