Commands › Exchange Online
Get-SweepRule
View Sweep rules in mailboxes. Sweep rules run at regular intervals to help keep your Inbox clean.
Quick start script
# Get-SweepRule — 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
Get-SweepRule | Format-List
# 3. Export for evidence / drift tracking
Get-SweepRule | Export-Clixml .\SweepRule-$(Get-Date -Format yyyyMMdd).xml
Syntax
Get-SweepRule [[-Identity] <SweepRuleIdParameter>]
[-BypassScopeCheck]
[-DomainController <Fqdn>]
[-Mailbox <MailboxIdParameter>]
[-Provider <String>]
[-ResultSize <Unlimited>]
[<CommonParameters>]
Parameters (7)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.