Set-SPOContainer
Sets or updates one or more property values for a container in SharePoint Embedded.
Syntax
ParamSet1
Set-SPOContainer
[-Identity] <SPOContainerPipeBind>
[[-SensitivityLabel] <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
BlockDownloadPolicy
Set-SPOContainer
[-Identity] <SPOContainerPipeBind>
[-BlockDownloadPolicy <Boolean>]
[-ExcludeBlockDownloadPolicyContainerOwners <Boolean>]
[-ReadOnlyForBlockDownloadPolicy <Boolean>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ParamSet2
Set-SPOContainer
[-Identity] <SPOContainerPipeBind>
[-RemoveLabel]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ConditionalAccess
Set-SPOContainer
[-Identity] <SPOContainerPipeBind>
[-ConditionalAccessPolicy <SPOConditionalAccessPolicyType>]
[-LimitedAccessFileType <SPOLimitedAccessFileType>]
[-AllowEditing <Boolean>]
[-ReadOnlyForUnmanagedDevices <Boolean>]
[-AuthenticationContextName <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
AllowDenyDomain
Set-SPOContainer
[-Identity] <SPOContainerPipeBind>
[-SharingDomainRestrictionMode <SharingDomainRestrictionModes>]
[-SharingAllowedDomainList <String>]
[-SharingBlockedDomainList <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PrincipalOwnerTransfer
Set-SPOContainer
[-Identity] <SPOContainerPipeBind>
-CurrentPrincipalOwner <String>
-NewPrincipalOwner <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
For any parameters that are passed in, the Set-SPOContainer
cmdlet sets or updates the setting for the active container identified by the parameter Identity
. The cmdlet throws an error if the identity of an archived container is provided. The principal owner transfer operation is supported only for containers that are user-owned. Attempting to perform this operation on non user-owned containers will result in an error.
Important
Always wait for the current principal owner transfer attempt to finish before reusing the cmdlet. Concurrent or premature reuse can lead to incomplete or invalid ownership changes.
You must be a SharePoint Embedded Administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Embedded Containers, see the online documentation at Intro to SharePoint Embedded Containers Management Shell.
Examples
Example 1
Set-SPOContainer -Identity https://contoso.sharepoint.com/contentstorage/CSP_33a63968-abae-49a3-a255-f83d0ab2260a/ -BlockDownloadPolicy $true
Example 1 sets the Block Download policy on the Container mentioned in the Identity parameter.
Example 2
Set-SPOContainer -Identity https://contoso.sharepoint.com/contentstorage/CSP_33a63968-abae-49a3-a255-f83d0ab2260a/ -ConditionalAccessPolicy AllowLimitedAccess
In this example, limited access is provided to content residing in the container.
Example 3
Set-SPOContainer -Identity https://contoso.sharepoint.com/contentstorage/CSP_33a63968-abae-49a3-a255-f83d0ab2260a/ -SensitivityLabel ab310e93-9f19-43f2-bc19-bf3386dc0956
This example sets a sensitivity label on the container.
Example 4
Set-SPOContainer -Identity https://contoso.sharepoint.com/contentstorage/CSP_33a63968-abae-49a3-a255-f83d0ab2260a/ -RemoveLabel
This example removes any previously set sensitivity label on the container.
Parameters
-AllowEditing
Applicable: SharePoint Online
Prevents users from editing Office files in the browser and copying and pasting Office file contents out of the browser window.
Parameter properties
Type: | System.Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ConditionalAccess
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-AuthenticationContextName
Applicable: SharePoint Online
The conditional access authentication context name.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ConditionalAccess
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-BlockDownloadPolicy
Applicable: SharePoint Online
As a SharePoint Embedded Administrator, you can block the download of files from SharePoint Embedded containers. This feature does not need Microsoft Entra Conditional Access policies. This feature can be set for individual containers but not at the organization level.
Blocking the download of files allows users to remain productive while addressing the risk of accidental data loss. Users have browser-only access with no ability to download, print, or sync files. They also won't be able to access content through apps, including the Microsoft Office desktop apps. When web access is limited, users will see the following message at the top of containers: "Your organization doesn't allow you to download, print, or sync from this Container. For help contact your IT department." Read the full documentation for advanced capabilities at Block download policy for SharePoint Containers and OneDrive.
Parameter properties
Type: | System.Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
BlockDownloadPolicy
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ConditionalAccessPolicy
Applicable: SharePoint Online
Read the Control access from unmanaged devices documentation to understand Conditional Access Policy usage in SharePoint Embedded container.
Possible values:
- AllowFullAccess: Allows full access from desktop apps, mobile apps, and the web.
- AllowLimitedAccess: Allows limited, web-only access.
- BlockAccess: Blocks access.
Parameter properties
Type: | Microsoft.Online.SharePoint.TenantManagement.SPOConditionalAccessPolicyType |
Default value: | None |
Accepted values: | AllowFullAccess, AllowLimitedAccess, BlockAccess, AuthenticationContext |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ConditionalAccess
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Confirm
Applicable: SharePoint Online
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-CurrentPrincipalOwner
Applicable: SharePoint Online
The current principal owner of the container.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
PrincipalOwnerTransfer
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ExcludeBlockDownloadPolicyContainerOwners
Applicable: SharePoint Online
Controls if container owners are excluded from block download policy.
Parameter properties
Type: | System.Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
BlockDownloadPolicy
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
Applicable: SharePoint Online
Use this parameter to specify the container url.
Parameter properties
Type: | Microsoft.Online.SharePoint.PowerShell.SPOContainerPipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-LimitedAccessFileType
Applicable: SharePoint Online
The following parameters can be used with -ConditionalAccessPolicy AllowLimitedAccess for both the organization-wide setting and the container-level setting.
OfficeOnlineFilesOnly: Allows users to preview only Office files in the browser. This option increases security but may be a barrier to user productivity.
LimitedAccessFileType WebPreviewableFiles (default): Allows users to preview Office files and other file types (such as PDF files and images) in the browser. Note that the contents of file types other than Office files are handled in the browser. This option optimizes for user productivity but offers less security for files that aren't Office files.
LimitedAccessFileType OtherFiles: Allows users to download files that can't be previewed, such as .zip and .exe. This option offers less security.
Parameter properties
Type: | Microsoft.Online.SharePoint.TenantManagement.SPOLimitedAccessFileType |
Default value: | None |
Accepted values: | OfficeOnlineFilesOnly, WebPreviewableFiles, OtherFiles |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ConditionalAccess
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NewPrincipalOwner
Applicable: SharePoint Online
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
PrincipalOwnerTransfer
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ReadOnlyForBlockDownloadPolicy
Applicable: SharePoint Online
Controls if read-only should be enabled for block download policy.
Parameter properties
Type: | System.Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
BlockDownloadPolicy
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ReadOnlyForUnmanagedDevices
Applicable: SharePoint Online
Controls whether unmanaged devices have read-only access.
Parameter properties
Type: | System.Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ConditionalAccess
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RemoveLabel
Applicable: SharePoint Online
This parameter allows you to remove the assigned sensitivity label on a container.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ParamSet2
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SensitivityLabel
Applicable: SharePoint Online
Specifies the unique identifier (GUID) of the SensitivityLabel.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ParamSet1
Position: | 1 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SharingAllowedDomainList
Applicable: SharePoint Online
Specifies a list of email domains that are allowed for sharing with the external collaborators. Use the space character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
AllowDenyDomain
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SharingBlockedDomainList
Applicable: SharePoint Online
Specifies a list of email domains that are blocked or prohibited for sharing with the external collaborators. Use space character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
AllowDenyDomain
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SharingDomainRestrictionMode
Applicable: SharePoint Online
Specifies the sharing mode for external domains.
Possible values are:
- None - Do not restrict sharing by domain
- AllowList - Sharing is allowed only with external users that have account on domains specified with -SharingAllowedDomainList
- BlockList - Sharing is allowed with external users in all domains except in domains specified with -SharingBlockedDomainList
Parameter properties
Type: | Microsoft.Online.SharePoint.TenantManagement.SharingDomainRestrictionModes |
Default value: | None |
Accepted values: | None, AllowList, BlockList |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
AllowDenyDomain
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Applicable: SharePoint Online
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.