Commands › Exchange Online

Get-SweepRule

Exchange Online ExchangeOnlineManagement Get-*

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)

ParameterTypeRequiredWhat it controls
-Identity SweepRuleIdParameter The Identity parameter specifies the Sweep rule that you want to view. You can use any value that uniquely identifies the rule. For example:
-BypassScopeCheck SwitchParameter The BypassScopeCheck switch specifies whether to bypass the scope check for the user that's running the command. You don't need to specify a value with this switch.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-Mailbox MailboxIdParameter The Mailbox parameter filters the results by the specified mailbox. You can use any value that uniquely identifies the mailbox. For example:
-Provider String The Provider parameter filters the results by the specified provider.
-ResultSize Unlimited This parameter is available only in the cloud-based service.
-SkipCount Int32 This parameter is available only in the cloud-based service.

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