Commands › Exchange Online

Set-QuarantinePolicy

Exchange Online ExchangeOnlineManagement Set-*

Modify quarantine policies in your cloud-based organization.

Quick start script

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

# 3. Make the change (dry run first)
Set-QuarantinePolicy -Identity <QuarantineTagIdParameter> -WhatIf
Set-QuarantinePolicy -Identity <QuarantineTagIdParameter>

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

Syntax

Set-QuarantinePolicy [-Identity] <QuarantineTagIdParameter>
 [-AdminNotificationFrequencyInDays <Int32>]
 [-AdminNotificationLanguage <EsnLanguage>]
 [-AdminNotificationsEnabled <Boolean>]
 [-AdminQuarantinePermissionsList <MultiValuedProperty>]
 [-Confirm]
 [-CustomDisclaimer <String>]
 [-DomainController <Fqdn>]
 [-EndUserQuarantinePermissions <QuarantinePermissions>]
 [-EndUserQuarantinePermissionsValue <Int32>]
 [-EndUserSpamNotificationCustomFromAddress <String>]
 [-EndUserSpamNotificationFrequency <TimeSpan>]
 [-EndUserSpamNotificationFrequencyInDays <Int32>]
 [-EndUserSpamNotificationLanguage <EsnLanguage>]
 [-EsnCustomSubject <MultiValuedProperty>]
 [-ESNEnabled <Boolean>]
 [-IgnoreDehydratedFlag]
 [-IncludeMessagesFromBlockedSenderAddress <Boolean>]
 [-MultiLanguageCustomDisclaimer <MultiValuedProperty>]
 [-MultiLanguageSenderName <MultiValuedProperty>]
 [-MultiLanguageSetting <MultiValuedProperty>]
 [-OrganizationBrandingEnabled <Boolean>]
 [-QuarantineRetentionDays <Int32>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (24)

ParameterTypeRequiredWhat it controls
-Identity QuarantineTagIdParameter yes The Identity parameter specifies the quarantine policy you want to modify. You can use any value that uniquely identifies the quarantine policy. For example:
-AdminNotificationFrequencyInDays Int32 This parameter is reserved for internal Microsoft use.
-AdminNotificationLanguage EsnLanguage This parameter is reserved for internal Microsoft use.
-AdminNotificationsEnabled Boolean This parameter is reserved for internal Microsoft use.
-AdminQuarantinePermissionsList MultiValuedProperty This parameter is reserved for internal Microsoft use.
-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.
-CustomDisclaimer String This parameter is reserved for internal Microsoft use.
-DomainController Fqdn This parameter is reserved for internal Microsoft use.
-EndUserQuarantinePermissions QuarantinePermissions **Note**: To set permissions in quarantine policies, we recommend using the EndUserQuarantinePermissionsValue parameter.
-EndUserQuarantinePermissionsValue Int32 The EndUserQuarantinePermissionsValue parameter specifies the end-user permissions for the quarantine policy.
-EndUserSpamNotificationCustomFromAddress String The EndUserSpamNotificationCustomFromAddress specifies the email address of an existing internal sender to use as the sender for quarantine notifications. To set this parameter back to the default email address...
-EndUserSpamNotificationFrequency TimeSpan The EndUserSpamNotificationFrequency parameter species how often quarantine notifications are sent to users. Valid values are:
-EndUserSpamNotificationFrequencyInDays Int32 This parameter is reserved for internal Microsoft use.
-EndUserSpamNotificationLanguage EsnLanguage This parameter is reserved for internal Microsoft use.
-EsnCustomSubject MultiValuedProperty The EsnCustomSubject parameter specifies the text to use in the Subject field of quarantine notifications.
-ESNEnabled Boolean The ESNEnabled parameter specifies whether to enable quarantine notifications (formerly known as end-user spam notifications) for the policy. Valid values are:
-IgnoreDehydratedFlag SwitchParameter This parameter is reserved for internal Microsoft use.
-IncludeMessagesFromBlockedSenderAddress Boolean The IncludeMessagesFromBlockedSenderAddress parameter specifies whether to send quarantine notifications for quarantined messages from blocked sender addresses. Valid values are:
-MultiLanguageCustomDisclaimer MultiValuedProperty The MultiLanguageCustomDisclaimer parameter specifies the custom disclaimer text to use near the bottom of quarantine notifications. The localized text, **A disclaimer from your organization:** is always included...
-MultiLanguageSenderName MultiValuedProperty The MultiLanguageSenderName parameter specifies the email sender's display name to use in quarantine notifications.
-MultiLanguageSetting MultiValuedProperty The MultiLanguageSetting parameter specifies the language of quarantine notifications. Valid values are:
-OrganizationBrandingEnabled Boolean The OrganizationBrandingEnabled parameter enables or disables organization branding in the end-user quarantine notification messages. Valid values are:
-QuarantineRetentionDays Int32 This parameter is reserved for internal Microsoft use.
-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.