Commands › Exchange Online

Set-OMEMessageRevocation

Exchange Online ExchangeOnlineManagement Set-*

Revoke Microsoft Purview Message Encryption for a message. Revoking encryption prevents the recipient from viewing the message in the OME portal.

Quick start script

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

# 3. Make the change
Set-OMEMessageRevocation -MessageId <String> -Revoke <Boolean>

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

Syntax

Set-OMEMessageRevocation -MessageId <String> -Revoke <Boolean>
 [<CommonParameters>]

Parameters (2)

ParameterTypeRequiredWhat it controls
-MessageId String yes The MessageId parameter specifies the message based on the value the Message-ID header field. This value is also known as the Client ID. The format of the Message-ID depends on the messaging server that sent the...
-Revoke Boolean yes The Revoke parameter specifies whether to revoke encryption for the message. Valid values are:

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