Commands › Exchange Online
Set-ManagementScope
Change an existing management scope.
Quick start script
# Set-ManagementScope — 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-ManagementScope
$before | Format-List
# 3. Make the change (dry run first)
Set-ManagementScope -Identity <ManagementScopeIdParameter> -DatabaseRestrictionFilter <String> -ServerRestrictionFilter <String> -WhatIf
Set-ManagementScope -Identity <ManagementScopeIdParameter> -DatabaseRestrictionFilter <String> -ServerRestrictionFilter <String>
# 4. Verify and diff
$after = Get-ManagementScope
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax — 3 parameter sets
DatabaseFilter
Set-ManagementScope [-Identity] <ManagementScopeIdParameter> -DatabaseRestrictionFilter <String>
[-Confirm]
[-DomainController <Fqdn>]
[-Force]
[-Name <String>]
[-WhatIf]
[<CommonParameters>]
ServerFilter
Set-ManagementScope [-Identity] <ManagementScopeIdParameter> -ServerRestrictionFilter <String>
[-Confirm]
[-DomainController <Fqdn>]
[-Force]
[-Name <String>]
[-WhatIf]
[<CommonParameters>]
RecipientFilter
Set-ManagementScope [-Identity] <ManagementScopeIdParameter>
[-RecipientRestrictionFilter <String>]
[-RecipientRoot <OrganizationalUnitIdParameter>]
[-Confirm]
[-DomainController <Fqdn>]
[-Force]
[-Name <String>]
[-WhatIf]
[<CommonParameters>]
Parameters (10)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.