Commands › Exchange Online

Get-ComplianceSecurityFilter

Exchange Online ExchangeOnlineManagement Get-*

This cmdlet is functional only in Security & Compliance PowerShell. For more information, see Security & Compliance PowerShell. Use the Get-ComplianceSecurityFilter cmdlet to view compliance security filters in the Microsoft Purview compliance portal. These filters allow specified users to search only a subset of mailboxes and SharePoint or OneDrive sites in your Microsoft 365 organization.

Quick start script

# Get-ComplianceSecurityFilter — 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-ComplianceSecurityFilter | Format-List

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

Syntax

Get-ComplianceSecurityFilter [-Action <ComplianceSecurityFilterActionType>]
 [-Confirm]
 [-FilterName <String>]
 [-User <String>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-Action ComplianceSecurityFilterActionType The Action parameter filters the results by the type of search action that a filter is applied to. Valid values are:
-Confirm SwitchParameter This parameter is reserved for internal Microsoft use.
-FilterName String The FilterName parameter specifies the name of the compliance security filter that you want to view. If the value contains spaces, enclose the value in quotation marks (").
-User String The User parameter filters the results by the user who gets a filter applied to their searches. Valid values are:
-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.