Commands › Exchange Online
Set-PolicyConfig
For more information, see Security & Compliance PowerShell. Use the Set-PolicyConfig cmdlet to modify the endpoint restrictions that are configured in the organization.
Quick start script
# Set-PolicyConfig — 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-PolicyConfig
$before | Format-List
# 3. Make the change (dry run first)
Set-PolicyConfig -WhatIf
Set-PolicyConfig
# 4. Verify and diff
$after = Get-PolicyConfig
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Set-PolicyConfig [[-Identity] <OrganizationIdParameter>]
[-AggregationTimeWindowForDlpAlerts <System.UInt32>]
[-CaseHoldPolicyLimit <Int32>]
[-ClassificationScheme <ClassificationScheme>]
[-ComplianceUrl <String>]
[-Confirm]
[-DlpAppGroups <PswsHashtable[]>]
[-DlpAppGroupsPsws <PswsHashtable[]>]
[-DlpExtensionGroups <PswsHashtable[]>]
[-DlpNetworkShareGroups <PswsHashtable>]
[-DlpPrinterGroups <PswsHashtable>]
[-DlpRemovableMediaGroups <PswsHashtable>]
[-DocumentIsUnsupportedSeverity <RuleSeverity>]
[-EnableAdvancedRuleBuilder <Boolean>]
[-EnableLabelCoauth <Boolean>]
[-EnableSpoAipMigration <Boolean>]
[-EndpointDlpGlobalSettings <PswsHashtable[]>]
[-EndpointDlpGlobalSettingsPsws <PswsHashtable[]>]
[-ExtendTeamsDlpPoliciesToSharePointOneDrive <Boolean>]
[-InformationBarrierMode <InformationBarrierMode>]
[-InformationBarrierPeopleSearchRestriction <InformationBarrierPeopleSearchRestriction>]
[-IsDlpSimulationOptedIn <Boolean>]
[-IsUserBaseDlpAlertAggregationEnabled <Boolean>]
[-MigrateLabelScheme]
[-MigrateLabelSchemeDisplayNames <System.Collections.Hashtable[]>]
[-OnPremisesWorkload <Workload>]
[-ProcessingLimitExceededSeverity <RuleSeverity>]
[-PurviewLabelConsent <Boolean>]
[-ReservedForFutureUse <Boolean>]
[-RetentionForwardCrawl <Boolean>]
[-RuleErrorAction <PolicyRuleErrorAction>]
[-SenderAddressLocation <PolicySenderAddressLocation>]
[-SiteGroups <PswsHashtable[]>]
[-SiteGroupsPsws <PswsHashtable[]>]
[-WhatIf]
[<CommonParameters>]
Parameters (35)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.