Commands › Exchange Online

New-AdaptiveScope

Exchange Online ExchangeOnlineManagement New-*

For more information, see Security & Compliance PowerShell. Use the New-AdaptiveScope cmdlet to create adaptive scopes in your organization. Adaptive scopes (or static scopes) are used in retention policies and retention label policies.

Quick start script

# New-AdaptiveScope — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-AdaptiveScope
$before | Format-List

# 3. Make the change
New-AdaptiveScope -Name <String> -FilterConditions <PswsHashtable> -LocationType <DynamicBoundaryLocationType>

# 4. Verify and diff
$after = Get-AdaptiveScope
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

Default

New-AdaptiveScope -Name <String> -FilterConditions <PswsHashtable> -LocationType <DynamicBoundaryLocationType>
 [-AdministrativeUnit <Guid>]
 [-Comment <String>]
 [<CommonParameters>]

AdaptiveScopeRawQuery

New-AdaptiveScope -Name <String> -LocationType <DynamicBoundaryLocationType> -RawQuery <String>
 [-AdministrativeUnit <Guid>]
 [-Comment <String>]
 [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies a unique name for the adaptive scope. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-FilterConditions PswsHashtable yes 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:
-LocationType DynamicBoundaryLocationType yes The LocationType parameter specifies the location where the adaptive scope filter is defined. Valid values are:
-RawQuery String yes The RawQuery parameter switches the scope to advanced query mode. You use OPATH filter syntax for advanced query mode.
-AdministrativeUnit Guid {{ Fill AdministrativeUnit Description }}
-Comment String 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".

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