Commands › Exchange Online

Delete-QuarantineMessage

Exchange Online ExchangeOnlineManagement Delete-*

Delete quarantine messages from your cloud-based organization

Quick start script

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

# 2. Run and inspect
Delete-QuarantineMessage -Identities <QuarantineMessageIdentity[]> | Format-List

# 3. Export for evidence / drift tracking
Delete-QuarantineMessage | Export-Clixml .\QuarantineMessage-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

Identities

Delete-QuarantineMessage -Identities <QuarantineMessageIdentity[]>
 [-Identity <QuarantineMessageIdentity>]
 [-Confirm]
 [-EntityType <Microsoft.Exchange.Management.FfoQuarantine.EntityType>]
 [-HardDelete]
 [-RecipientAddress <String[]>]
 [-WhatIf]
 [<CommonParameters>]

IdentityOnly

Delete-QuarantineMessage -Identity <QuarantineMessageIdentity>
 [-Confirm]
 [-EntityType <Microsoft.Exchange.Management.FfoQuarantine.EntityType>]
 [-HardDelete]
 [-RecipientAddress <String[]>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Identities QuarantineMessageIdentity[] yes The Identities parameter identifies quarantined messages for bulk operations. You identify the messages by using the syntax: `value1,value2...valueN`. Each value is a unique quarantined message identifier in the...
-Identity QuarantineMessageIdentity The Identity parameter specifies the quarantined message that you want to delete. The value is a unique quarantined message identifier in the format `GUID1\GUID2` (for example...
-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.
-EntityType EntityType The EntityType parameter filters the results by EntityType. Valid values are:
-HardDelete SwitchParameter The HardDelete switch specifies the message is permanently deleted and isn't recoverable. You don't need to specify a value with this switch.
-RecipientAddress String[] The RecipientAddress parameter filters the results by the recipient's email address. You can specify multiple values separated by commas.
-WhatIf SwitchParameter 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.