Commands › Exchange Online
Set-AdaptiveScope
For more information, see Security & Compliance PowerShell. Use the Set-AdaptiveScope cmdlet to modify adaptive scopes in your organization.
Quick start script
# Set-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
Set-AdaptiveScope -Identity <ComplianceRuleIdParameter> -AdministrativeUnit <Guid> -FilterConditions <PswsHashtable>
# 4. Verify and diff
$after = Get-AdaptiveScope
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax — 3 parameter sets
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>]
Parameters (5)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.