Commands › Exchange Online
Set-ProtectionAlert
For more information, see Security & Compliance PowerShell. Use the Set-ProtectionAlert cmdlet to modify alert policies in the Microsoft Purview compliance portal. **Note**: You can't use this cmdlet to edit default alert policies. You can only modify alerts that you created using the New-ProtectionAlert cmdlet.
Quick start script
# Set-ProtectionAlert — 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-ProtectionAlert
$before | Format-List
# 3. Make the change (dry run first)
Set-ProtectionAlert -Identity <ComplianceRuleIdParameter> -WhatIf
Set-ProtectionAlert -Identity <ComplianceRuleIdParameter>
# 4. Verify and diff
$after = Get-ProtectionAlert
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Set-ProtectionAlert [-Identity] <ComplianceRuleIdParameter>
[-AggregationType <AlertAggregationType>]
[-AlertBy <MultiValuedProperty>]
[-AlertFor <MultiValuedProperty>]
[-Category <AlertRuleCategory>]
[-Comment <String>]
[-Confirm]
[-Description <String>]
[-Disabled <Boolean>]
[-Filter <String>]
[-NotificationCulture <CultureInfo>]
[-NotificationEnabled <Boolean>]
[-NotifyUser <MultiValuedProperty>]
[-NotifyUserOnFilterMatch <Boolean>]
[-NotifyUserSuppressionExpiryDate <DateTime>]
[-NotifyUserThrottleThreshold <Int32>]
[-NotifyUserThrottleWindow <Int32>]
[-Operation <MultiValuedProperty>]
[-PrivacyManagementScopedSensitiveInformationTypes <MultiValuedProperty>]
[-PrivacyManagementScopedSensitiveInformationTypesForCounting <MultiValuedProperty>]
[-PrivacyManagementScopedSensitiveInformationTypesThreshold <System.UInt64>]
[-Severity <RuleSeverity>]
[-Threshold <Int32>]
[-TimeWindow <Int32>]
[-VolumeThreshold <System.UInt64>]
[-WhatIf]
[<CommonParameters>]
Parameters (26)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.