Edit

Share via


Get-ComplianceSecurityFilter

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.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Default (Default)

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

Description

Compliance security filters work with compliance searches in the Microsoft Purview compliance portal (*-ComplianceSearch cmdlets), not In-Place eDiscovery searches in Exchange Online (*-MailboxSearch cmdlets).

To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see Permissions in the Microsoft Purview compliance portal.

Examples

Example 1

Get-ComplianceSecurityFilter | Format-Table -Auto FilterName,Action

This example returns a summary list of all compliance security filters.

Example 2

Get-ComplianceSecurityFilter -FilterName "HR Filter"

This example returns detailed information about the compliance security filter named HR Filter.

Parameters

-Action

Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Security & Compliance

The Action parameter filters the results by the type of search action that a filter is applied to. Valid values are:

  • Export: The filter is applied when exporting search results, or preparing them for analysis in eDiscovery Premium.
  • Preview: The filter is applied when previewing search results.
  • Purge: The filter is applied when purging search results. How the items are deleted is controlled by the PurgeType parameter value on the New-ComplianceSearchAction cmdlet. The default value is SoftDelete, which means the purged items are recoverable by users until the deleted items retention period expires.
  • Search: The filter is applied when running a search.
  • All: The filter is applied to all search actions.

Parameter properties

Type:ComplianceSecurityFilterActionType
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Security & Compliance

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.
  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FilterName

Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Security & Compliance

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 (").

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-User

Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Security & Compliance

The User parameter filters the results by the user who gets a filter applied to their searches. Valid values are:

  • The alias or email address of a user.
  • The value All.
  • The name of a role group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Security & Compliance

The WhatIf switch doesn't work in Security & Compliance PowerShell.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.