Commands › Exchange Online

Set-AttachmentFilterListConfig

Exchange Online ExchangeOnlineManagement Set-*

This cmdlet is available or effective only on Edge Transport servers in on-premises Exchange. Use the Set-AttachmentFilterListConfig cmdlet to modify the configuration of the Attachment Filtering agent on Edge Transport servers.

Quick start script

# Set-AttachmentFilterListConfig — 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-AttachmentFilterListConfig
$before | Format-List

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

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

Syntax

Set-AttachmentFilterListConfig
 [-Action <FilterActions>]
 [-AdminMessage <String>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-ExceptionConnectors <MultiValuedProperty>]
 [-RejectResponse <String>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Action FilterActions The Action parameter specifies how the Attachment Filtering agent handles an attachment that matches an entry on the attachment filter list. Valid values are:
-AdminMessage String The AdminMessage parameter specifies the content of a text file that replaces attachments removed by the Attachment Filtering agent. The AdminMessage parameter only appears when the Attachment Filtering agent is...
-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...
-ExceptionConnectors MultiValuedProperty The ExceptionConnectors parameter specifies a list of connectors that should be excluded from attachment filtering. Attachment filters aren't applied to email messages received through these connectors. You must use...
-RejectResponse String The RejectResponse parameter specifies the message body that you want delivered in the NDR to senders whose messages contain an attachment that's blocked. The RejectResponse parameter is required only if you set the...
-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.