Commands › Exchange Online

Invoke-HoldRemovalAction

Exchange Online ExchangeOnlineManagement Invoke-*

For more information, see Security & Compliance PowerShell. Use the Invoke-HoldRemovalAction cmdlet to view and remove holds on mailboxes and SharePoint sites. You can also see holds that were previously removed by using this cmdlet.

Quick start script

# Invoke-HoldRemovalAction — 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
Invoke-HoldRemovalAction -Action <HoldRemovalActionType> | Format-List

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

Syntax

Invoke-HoldRemovalAction -Action <HoldRemovalActionType>
 [-Confirm]
 [-ExchangeLocation <String>]
 [-Force]
 [-HoldId <String>]
 [-SharePointLocation <String>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Action HoldRemovalActionType yes The Action parameter specifies the mode that the cmdlet operates in. Valid values are:
-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.
-ExchangeLocation String The ExchangeLocation parameter specifies the email address of the mailbox that contains the holds to view or remove.
-Force SwitchParameter The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.
-HoldId String The HoldId parameter specifies the hold that you want to view or remove.
-SharePointLocation String The SharePointLocation parameter specifies the URL of the SharePoint site that contains the holds to view or remove.
-WhatIf SwitchParameter The WhatIf switch doesn't work in Security & Compliance PowerShell.

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