Commands › SharePoint Online
Set-SPOContainer
Sets or updates one or more property values for a container in SharePoint Embedded.
Quick start script
# Set-SPOContainer — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SPOContainer
$before | Format-List
# 3. Make the change (dry run first)
Set-SPOContainer -CurrentPrincipalOwner <String> -Identity <SPOContainerPipeBind> -NewPrincipalOwner <String> -WhatIf
Set-SPOContainer -CurrentPrincipalOwner <String> -Identity <SPOContainerPipeBind> -NewPrincipalOwner <String>
# 4. Verify and diff
$after = Get-SPOContainer
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax — 13 parameter sets
ParamSet1
Set-SPOContainer [-Identity] <SPOContainerPipeBind> [[-SensitivityLabel] <String>]
[-InformationBarriersMode <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
BlockDownloadPolicy
Set-SPOContainer [-Identity] <SPOContainerPipeBind> [-BlockDownloadPolicy <Boolean>]
[-ExcludeBlockDownloadPolicyContainerOwners <Boolean>] [-ReadOnlyForBlockDownloadPolicy <Boolean>]
[-InformationBarriersMode <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
RestrictedAccessControl
Set-SPOContainer [-Identity] <SPOContainerPipeBind> [-EnableRestrictedAccessControl <Boolean>]
[-RestrictedAccessControlGroups <Guid[]>] [-InformationBarriersMode <String>] [-WhatIf] [-Confirm]
[<CommonParameters>]
RestrictedAccessControlGroupsToAdd
Set-SPOContainer [-Identity] <SPOContainerPipeBind> [-RestrictedAccessControlGroupsToAdd <Guid[]>]
[-InformationBarriersMode <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
9 more parameter sets — see the parameter table below.
Parameters (27)
Message Center changes mentioning this command
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.