Commands › Exchange Online

New-QuarantinePolicy

Exchange Online ExchangeOnlineManagement New-*

Create quarantine policies in your cloud-based organization.

Quick start script

# New-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
New-QuarantinePolicy -Name <String>

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

Syntax

New-QuarantinePolicy [-Name] <String>
 [-AdminDisplayName <String>]
 [-AdminNotificationFrequencyInDays <Int32>]
 [-AdminNotificationLanguage <EsnLanguage>]
 [-AdminNotificationsEnabled <Boolean>]
 [-AdminQuarantinePermissionsList <MultiValuedProperty>]
 [-CustomDisclaimer <String>]
 [-DomainController <Fqdn>]
 [-EndUserQuarantinePermissions <QuarantinePermissions>]
 [-EndUserQuarantinePermissionsValue <Int32>]
 [-EndUserSpamNotificationCustomFromAddress <String>]
 [-EndUserSpamNotificationFrequency <TimeSpan>]
 [-EndUserSpamNotificationFrequencyInDays <Int32>]
 [-EndUserSpamNotificationLanguage <EsnLanguage>]
 [-EsnCustomSubject <MultiValuedProperty>]
 [-ESNEnabled <Boolean>]
 [-IncludeMessagesFromBlockedSenderAddress <Boolean>]
 [-MultiLanguageCustomDisclaimer <MultiValuedProperty>]
 [-MultiLanguageSenderName <MultiValuedProperty>]
 [-MultiLanguageSetting <MultiValuedProperty>]
 [-OrganizationBrandingEnabled <Boolean>]
 [-QuarantinePolicyType <QuarantinePolicyType>]
 [-QuarantineRetentionDays <Int32>]
 [<CommonParameters>]

Parameters (23)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies a unique name for the quarantine policy. If the value contains spaces, enclose the value in quotation marks (").
-AdminDisplayName String The AdminDisplayName parameter specifies a description for the quarantine policy. If the value contains spaces, enclose the value in quotation marks (").
-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.
-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.
-EndUserSpamNotificationFrequency TimeSpan The EndUserSpamNotificationFrequency parameter specifies 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:
-IncludeMessagesFromBlockedSenderAddress Boolean The IncludeMessagesFromBlockedSenderAddress parameter specifies whether to send quarantine notifications for quarantined messages from blocked sender addresses. Valid values are:
-MultiLanguageCustomDisclaimer MultiValuedProperty This parameter is reserved for internal Microsoft use.
-MultiLanguageSenderName MultiValuedProperty This parameter is reserved for internal Microsoft use.
-MultiLanguageSetting MultiValuedProperty This parameter is reserved for internal Microsoft use.
-OrganizationBrandingEnabled Boolean This parameter is reserved for internal Microsoft use.
-QuarantineRetentionDays Int32 This parameter is reserved for internal Microsoft use.
-QuarantinePolicyType QuarantinePolicyType This parameter is reserved for internal Microsoft use.

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