Edit

Share via


Set-AdaptiveScope

This cmdlet is available only in Security & Compliance PowerShell. For more information, see Security & Compliance PowerShell.

Use the Set-AdaptiveScope cmdlet to modify adaptive scopes in your organization.

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

Syntax

Default

Set-AdaptiveScope
    [-Identity] <ComplianceRuleIdParameter>
    -FilterConditions <PswsHashtable>
    [-AdministrativeUnit <Guid>]
    [-Comment <String>]
    [<CommonParameters>]

AdaptiveScopeRawQuery

Set-AdaptiveScope
    [-Identity] <ComplianceRuleIdParameter>
    -RawQuery <String>
    [-AdministrativeUnit <Guid>]
    [-Comment <String>]
    [<CommonParameters>]

AdministrativeUnit

Set-AdaptiveScope
    [-Identity] <ComplianceRuleIdParameter>
    -AdministrativeUnit <Guid>
    [-Comment <String>]
    [<CommonParameters>]

Description

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

Set-AdaptiveScope -Identity "Project X" -FilterConditions @{"Conditions" = @{"Value" = "Redmond"; "Operator" = "Equals"; "Name" = "City"}; "Conjunction" = "And"}

This example modifies the filter in exiting adaptive scope named Project X. The new filter looks for all users in the city of Redmond.

Parameters

-AdministrativeUnit

Applicable: Security & Compliance

{{ Fill AdministrativeUnit Description }}

Parameter properties

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

Parameter sets

Default
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
AdaptiveScopeRawQuery
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
AdministrativeUnit
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Comment

Applicable: Security & Compliance

The Comment parameter specifies an optional comment. If you specify a value that contains spaces, enclose the value in quotation marks ("), for example: "This is an admin note".

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

-FilterConditions

Applicable: Security & Compliance

The FilterConditions parameter specifies the conditions that are included in the dynamic boundary. Valid syntax and values depend of the value of the LocationType parameter:

  • User or Group: Active Directory attributes. For example, for the condition "('Country or region' equals 'US' or 'Canada') and 'Department' equals 'Finance'", use the following syntax: @{"Conditions" = @(@{"Conditions" = @(@{"Value" = "US"; "Operator" = "Equals"; "Name" = "CountryOrRegion"}, @{"Value" = "Canada"; "Operator" = "Equals"; "Name" = "CountryOrRegion"}); "Conjunction" = "Or"}, @{"Value" = "Finance"; "Operator" = "Equals"; "Name" = "Department"}); "Conjunction" = "And"}
  • Site: Indexed custom properties. For example, for the condition "'Refinable string 0' equals 'Human Resources', use the following syntax: @{"Conditions" = @{"Value" = "Human Resources"; "Operator" = "Equals"; "Name" = "RefinableString00"}; "Conjunction" = "And"}

You can't use this parameter with the RawQuery parameter.

Parameter properties

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

Parameter sets

Default
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Security & Compliance

The Identity parameter specifies the adaptive scope that you want to modify. You can use any value that uniquely identifies the adaptive scope. For example:

  • Name
  • Distinguished name (DN)
  • GUID

Parameter properties

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

Parameter sets

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

-RawQuery

Applicable: Security & Compliance

The RawQuery parameter switches the scope to advanced query mode. You use OPATH filter syntax for advanced query mode.

You can't use this parameter with the FilterConditions parameter.

Parameter properties

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

Parameter sets

AdaptiveScopeRawQuery
Position:Named
Mandatory:True
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.