共用方式為


Set-SPOContainer

設定或更新 SharePoint Embedded 中容器的一或多個屬性值。

語法

Set-SPOContainer
   [-Identity] <SPOContainerPipeBind>
   [-BlockDownloadPolicy <Boolean>]
   [-ExcludeBlockDownloadPolicyContainerOwners <Boolean>]
   [-ReadOnlyForBlockDownloadPolicy <Boolean>]
   [<CommonParameters>]
Set-SPOContainer
   [-Identity] <SPOContainerPipeBind>
   [-ConditionalAccessPolicy <SPOConditionalAccessPolicyType>]
   [-LimitedAccessFileType <SPOLimitedAccessFileType>]
   [-AllowEditing <Boolean>]
   [-ReadOnlyForUnmanagedDevices <Boolean>]
   [-AuthenticationContextName <String>]
   [<CommonParameters>]
Set-SPOContainer
   [-Identity] <SPOContainerPipeBind>
   [[-SensitivityLabel] <String>]
   [<CommonParameters>]
Set-SPOContainer
   [-Identity] <SPOContainerPipeBind>
   [-RemoveLabel]
   [<CommonParameters>]
Set-SPOContainer
   [-Identity] <SPOContainerPipeBind>
   [-SharingDomainRestrictionMode <SharingDomainRestrictionModes>]
   [-SharingAllowedDomainList <String>]
   [-SharingBlockedDomainList <String>]
   [<CommonParameters>]

Description

對於傳入的任何參數, Set-SPOContainer Cmdlet 會設定或更新 參數 Identity所識別之使用中容器的設定。 如果提供封存容器的身分識別,Cmdlet 會擲回錯誤。

您必須是 SharePoint Embedded 系統管理員,才能執行 Cmdlet。

如需 SharePoint Embedded 容器 Windows PowerShell 許可權和最新資訊,請參閱 SharePoint Embedded 容器管理命令介面簡介中的在線檔。

範例

範例 1

Set-SPOContainer -Identity https://contoso.sharepoint.com/contentstorage/CSP_33a63968-abae-49a3-a255-f83d0ab2260a/ -BlockDownloadPolicy $true

範例 1 會在 Identity 參數中所提及的容器上設定封鎖下載原則。

範例 2

Set-SPOContainer -Identity https://contoso.sharepoint.com/contentstorage/CSP_33a63968-abae-49a3-a255-f83d0ab2260a/ -ConditionalAccessPolicy AllowLimitedAccess

在此範例中,會對位於容器中的內容提供有限的存取權。

範例 3

Set-SPOContainer -Identity https://contoso.sharepoint.com/contentstorage/CSP_33a63968-abae-49a3-a255-f83d0ab2260a/ -SensitivityLabel ab310e93-9f19-43f2-bc19-bf3386dc0956

本範例會在容器上設定敏感度標籤。

範例 4

Set-SPOContainer -Identity https://contoso.sharepoint.com/contentstorage/CSP_33a63968-abae-49a3-a255-f83d0ab2260a/ -RemoveLabel

此範例會移除容器上任何先前設定的敏感度標籤。

參數

-AllowEditing

防止使用者在瀏覽器中編輯 Office 檔案,以及將 Office 檔案內容複製並貼上至瀏覽器視窗外。

PARAMVALUE:False |真

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AuthenticationContextName

條件式存取驗證內容名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-BlockDownloadPolicy

身為 SharePoint Embedded 系統管理員,您可以封鎖從 SharePoint Embedded 容器下載檔。 此功能不需要 Microsoft Entra 條件式存取原則。 此功能可以針對個別容器設定,但不能在組織層級設定。

封鎖檔案下載可讓使用者保持生產力,同時解決意外遺失數據的風險。 使用者具有僅限瀏覽器的存取權,無法下載、列印或同步處理檔案。 使用者也無法透過應用程式存取內容,包括 Microsoft Office 桌面應用程式。 當 Web 存取受到限制時,使用者會在容器頂端看到下列訊息:「您的組織不允許您從此容器下載、列印或同步處理。 如需協助,請連絡您的IT部門。」閱讀 SharePoint 容器和 OneDrive 的封鎖下載原則進階功能的完整檔。

PARAMVALUE: $true | $false

類型:Boolean
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False
適用於:SharePoint Embedded

-ConditionalAccessPolicy

請閱讀 控制來自非受控裝置的存取 檔,以瞭解 SharePoint Embedded 容器中的條件式存取原則使用方式。

可能的值:

  • AllowFullAccess:允許從傳統型應用程式、行動應用程式和 Web 完整存取。
  • AllowLimitedAccess:允許有限、僅限 Web 的存取。
  • BlockAccess:封鎖存取。
類型:SPOConditionalAccessPolicyType
Position:Named
預設值:AllowFullAccess
必要:False
接受管線輸入:False
接受萬用字元:False
適用於:SharePoint Embedded

-ExcludeBlockDownloadPolicyContainerOwners

控制是否從封鎖下載原則中排除容器擁有者。

PARAMVALUE:False |真

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Identity

使用此參數來指定容器 URL。

類型:String
Position:Named
預設值:False
必要:True
接受管線輸入:False
接受萬用字元:False
適用於:SharePoint Embedded

-LimitedAccessFileType

下列參數可以與 -ConditionalAccessPolicy AllowLimitedAccess 搭配使用,以用於整個組織的設定和容器層級設定。

OfficeOnlineFilesOnly:允許使用者僅預覽瀏覽器中的 Office 檔案。 此選項可提升安全性,但可能會阻礙使用者生產力。

LimitedAccessFileType WebPreviewableFiles (預設) :允許使用者在瀏覽器中預覽 Office 檔案和其他文件類型 (,例如 PDF 檔案和影像) 。 請注意,Office 檔案以外的文件類型內容會在瀏覽器中處理。 此選項可最佳化使用者生產力,但針對非 Office 檔案提供較少的安全性。

LimitedAccessFileType OtherFiles:允許使用者下載無法預覽的檔案,例如 .zip 和 .exe。 此選項提供的安全性較低。

類型:SPOLimitedAccessFileType
接受的值:OfficeOnlineFilesOnly, WebPreviewableFiles, OtherFiles
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ReadOnlyForBlockDownloadPolicy

控制區塊下載原則是否應啟用唯讀。

PARAMVALUE:False |真

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ReadOnlyForUnmanagedDevices

控制 Unmanaged 裝置是否具有唯讀存取權。

PARAMVALUE:False |真

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RemoveLabel

此參數可讓您移除容器上指派的敏感度標籤。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SensitivityLabel

指定 SensitivityLabel (GUID) 的唯一識別符。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False
適用於:SharePoint Embedded

-SharingAllowedDomainList

指定允許與外部共同作業者共用的電子郵件網域清單。 使用空格字元作為輸入多個值的分隔符號。 例如,「contoso.com fabrikam.com」。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SharingBlockedDomainList

指定封鎖或禁止與外部共同作業者共用的電子郵件網域清單。 使用空格字元作為輸入多個值的分隔符號。 例如,「contoso.com fabrikam.com」。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SharingDomainRestrictionMode

指定外部網域的共用模式。

可能的值為:

無 - 請勿依網域 AllowList 限制共用 - 僅允許在以 -SharingAllowedDomainList BlockList 指定之網域上具有帳戶的外部用戶共用 - 除了以 -SharingBlockedDomainList 指定的網域以外,所有網域中的外部使用者都允許共用

類型:SharingDomainRestrictionModes
接受的值:None, AllowList, BlockList
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False