Commands › Exchange Online

Set-ContentFilterConfig

Exchange Online ExchangeOnlineManagement Set-*

Modify the content filter configuration on a Mailbox server or an Edge Transport server.

Quick start script

# Set-ContentFilterConfig — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-ContentFilterConfig
$before | Format-List

# 3. Make the change (dry run first)
Set-ContentFilterConfig  -WhatIf
Set-ContentFilterConfig

# 4. Verify and diff
$after = Get-ContentFilterConfig
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-ContentFilterConfig [-BypassedRecipients <MultiValuedProperty>]
 [-BypassedSenderDomains <MultiValuedProperty>]
 [-BypassedSenders <MultiValuedProperty>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-Enabled <Boolean>]
 [-ExternalMailEnabled <Boolean>]
 [-InternalMailEnabled <Boolean>]
 [-OutlookEmailPostmarkValidationEnabled <Boolean>]
 [-QuarantineMailbox <SmtpAddress>]
 [-RejectionResponse <AsciiString>]
 [-SCLDeleteEnabled <Boolean>]
 [-SCLDeleteThreshold <Int32>]
 [-SCLQuarantineEnabled <Boolean>]
 [-SCLQuarantineThreshold <Int32>]
 [-SCLRejectEnabled <Boolean>]
 [-SCLRejectThreshold <Int32>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (18)

ParameterTypeRequiredWhat it controls
-BypassedRecipients MultiValuedProperty The BypassedRecipients parameter specifies the SMTP addresses of recipients who skip processing by the Content Filter agent.
-BypassedSenderDomains MultiValuedProperty The BypassedSenderDomains parameter specifies the sender email address domains of senders who skip processing by the Content Filter agent.
-BypassedSenders MultiValuedProperty The BypassedSenders parameter specifies the SMTP addresses of senders who skip processing by the Content Filter agent.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-Enabled Boolean The Enabled parameter enables or disables the Content Filter agent on the computer on which you're running the command. Valid values are:
-ExternalMailEnabled Boolean The ExternalMailEnabled parameter specifies whether all messages from unauthenticated connections from sources external to your Exchange organization are processed by the Content Filter agent. Valid values are:
-InternalMailEnabled Boolean The InternalMailEnabled parameter specifies whether all messages from authenticated connections and from authoritative domains in your enterprise are processed by the Content Filter agent. Valid values are:
-OutlookEmailPostmarkValidationEnabled Boolean The OutlookEmailPostmarkValidationEnabled parameter specifies whether Outlook Email Postmark validation is enabled.
-QuarantineMailbox SmtpAddress The QuarantineMailbox parameter specifies an SMTP address to be used as a spam quarantine mailbox. A spam quarantine mailbox is required when you set the SCLQuarantineEnabled parameter to $true. All messages that...
-RejectionResponse AsciiString The RejectionResponse parameter specifies the message body that you want delivered in the non-delivery report (NDR) to senders whose messages meet or exceed the SCLRejectThreshold value. The RejectionResponse...
-SCLDeleteEnabled Boolean The SCLDeleteEnabled parameter specifies whether all messages that meet or exceed the value set in the SCLDeleteThreshold parameter are deleted. Valid values are:
-SCLDeleteThreshold Int32 The SCLDeleteThreshold parameter specifies an integer value from 1 through 9. This value represents the SCL rating that a particular message must meet or exceed for the Content Filter agent to delete the message and...
-SCLQuarantineEnabled Boolean The SCLQuarantineEnabled parameter specifies whether all messages that meet or exceed the value set in the SCLQuarantineThreshold parameter are sent to the spam quarantine mailbox specified in the QuarantineMailbox...
-SCLQuarantineThreshold Int32 The SCLQuarantineThreshold parameter specifies an integer value from 1 through 9. This value represents the SCL rating that a particular message must meet or exceed for the Content Filter agent to quarantine the...
-SCLRejectEnabled Boolean The SCLRejectEnabled parameter specifies whether all messages that meet or exceed the value set in the SCLRejectThreshold parameter are rejected in an NDR to the sender. Valid values are:
-SCLRejectThreshold Int32 The SCLRejectThreshold parameter specifies an integer value from 1 through 9. This value represents the SCL rating that a particular message must meet or exceed for the Content Filter agent to reject the message and...
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.