Commands › Exchange Online

Disable-MailboxQuarantine

Exchange Online ExchangeOnlineManagement Disable-*

Release quarantined mailboxes.

Quick start script

# Disable-MailboxQuarantine — 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-MailboxQuarantine
$before | Format-List

# 3. Make the change (dry run first)
Disable-MailboxQuarantine -Identity <GeneralMailboxIdParameter> -Database <DatabaseIdParameter> -IncludeAllDatabases <SwitchParameter> -WhatIf
Disable-MailboxQuarantine -Identity <GeneralMailboxIdParameter> -Database <DatabaseIdParameter> -IncludeAllDatabases <SwitchParameter>

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

Syntax — 5 parameter sets

MailboxIdentity

Disable-MailboxQuarantine [-Identity] <GeneralMailboxIdParameter>
 [-Confirm]
 [-WhatIf]
 [<CommonParameters>]

MailboxOrMailUserIdentity

Disable-MailboxQuarantine [-Identity] <GeneralMailboxOrMailUserIdParameter>
 [-IncludePassive]
 [-Confirm]
 [-WhatIf]
 [<CommonParameters>]

StoreMailboxIdentity

Disable-MailboxQuarantine -Database <DatabaseIdParameter> -StoreMailboxIdentity <StoreMailboxIdParameter>
 [-IncludePassive]
 [-Confirm]
 [-WhatIf]
 [<CommonParameters>]

IncludeAllMailboxes

Disable-MailboxQuarantine -Database <DatabaseIdParameter>
 [-IncludeAllMailboxes]
 [-IncludePassive]
 [-Confirm]
 [-WhatIf]
 [<CommonParameters>]

1 more parameter sets — see the parameter table below.

Parameters (9)

ParameterTypeRequiredWhat it controls
-Identity GeneralMailboxIdParameter yes The Identity parameter specifies the mailbox that you want to release from quarantine. You can use any value that uniquely identifies the mailbox. For example:
-Database DatabaseIdParameter yes The Database parameter specifies the database that contains the mailboxes you want to release from quarantine. You can use any value that uniquely identifies the database. For example:
-IncludeAllDatabases SwitchParameter yes The IncludeAllDatabases switch specifies that you want to release all quarantined mailboxes in all databases on the server you specify with the Server parameter. You don't need to specify a value with this switch.
-IncludeAllMailboxes SwitchParameter yes The IncludeAllMailboxes switch specifies that you want to release all mailboxes from quarantine in the database you specify with the Database parameter. You don't need to specify a value with this switch.
-Server ServerIdParameter yes The Server parameter specifies the server that contains the mailboxes that you want to release from quarantine by using the IncludeAllDatabases switch. You can use any value that uniquely identifies the server. For example:
-StoreMailboxIdentity StoreMailboxIdParameter yes The StoreMailboxIdentity parameter specifies the mailbox that you want to release from quarantine when you use the Database parameter.
-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.
-IncludePassive SwitchParameter The IncludePassive switch specifies that you also want to release inactive copies of the mailbox from quarantine. You don't need to specify a value with this switch.
-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.