在 SharePoint Server 中管理網站集合的鎖定狀態

適用于:yes-img-132013 yes-img-16 2016yes-img-192019 yes-img-se訂閱版本 no-img-sopMicrosoft 365 中的 SharePoint

您可以鎖定網站集合的狀態,以便控制網站集合上允許的動作。

下表說明 SharePoint Server 中提供的鎖定選項。

選項 描述
未鎖定
解除鎖定網站集合,以供使用者使用。
新增禁止的內容
防止使用者新增網站集合的內容。 但仍允許更新與刪除。
唯讀 (封鎖新增、更新與刪除)
防止使用者新增、更新或刪除內容。 若使用者嘗試新增、更新或刪除內容,則會收到錯誤訊息,通知使用者存取已遭拒,且使用者沒有權限可以執行動作或存取資源。 若網站集合已封存或受伺服器陣列管理員控制,則唯讀鎖定也可由網站集合管理員控制
無法存取
防止使用者存取網站集合及內容。 嘗試存取網站的使用者會收到錯誤頁面,通知道使用者網站拒絕顯示網頁。

注意事項

[!附註] 如果您要限制可在網站集合中儲存的內容量,您可以將配額範本套用至網站集合。 一旦達到配額範本中指定的內容儲存量,網站集合就會自動鎖住,直到規定的儲存配額放寬或者部分的內容移除為止。 如需詳細資訊,請參閱<在 SharePoint Server 中建立、編輯和刪除配額範本>。

重要事項

本文中的步驟適用於 SharePoint Server 2016、SharePoint Foundation 2013 和 SharePoint Server 2013。

瞭解 在 Microsoft 365 中鎖定和解除鎖定 SharePoint 的網站

使用管理中心管理網站集合的鎖定狀態

使用SharePoint 管理中心網站,依照此程序鎖定或解除鎖定網站集合

使用管理中心管理網站集合的鎖定狀態

  1. 確認是否具備下列系統管理認證。

    • 您必須是網站集合的網站集合管理員群組的成員。
  2. Open Central Administration. On the Application Management page, in the Site Collections section, click Configure quotas and locks.

  3. If the site collection you want is not already selected, in the Site Collection section, on the Site Collection menu, click Change Site Collection. Use the Select Site Collection page to select a site collection.

  4. 在 [網站集合配額與鎖定] 頁面上的 [網站鎖定資訊] 區段,選取下列選項之一:

    • [未鎖定] 可解除鎖定網站集合,以供使用者使用。

    • Adding content prevented to prevent users from adding new content to the site collection. Updates and deletions are still allowed.

    • Read-only (blocks additions, updates, and deletions) to prevent users from adding, updating, or deleting content. Choose whether you want this to be farm administrator controlled or site collection administrator controlled.

    • No access to prevent users from accessing the site collection and its content. Users who attempt to access the site receive an error message.

  5. 如果您選取 [新增避免的內容]、[唯讀 (封鎖新增、更新與刪除)] 或 [無法存取],請在 [其他鎖定資訊] 方塊中輸入鎖定原因。

  6. 完成後,按一下 [確定]

使用 Windows PowerShell 管理網站集合的鎖定狀態

使用 Microsoft PowerShell,依照此程序鎖定或解除鎖定網站集合

使用 Windows PowerShell 管理網站集合的鎖定狀態

  1. 確認符合下列基本需求:請參閱<Add-SPShellAdmin>。

  2. 開啟 SharePoint 管理命令介面。

  3. 在 PowerShell 命令提示字元處,輸入下列命令,然後按 Enter 鍵:

    Set-SPSite -Identity "<SiteCollection>" -LockState "<State>"
    

    其中:

    • <SiteCollection> 是您要鎖定或解除鎖定的網站集合 URL。

    • <State> 是下列值之一:

      • Unlock 可解除鎖定網站集合,以供使用者使用。

      • NoAdditions 可防止使用者新增新的內容至網站集合。 仍然允許更新及刪除。

      • ReadOnly 可防止使用者新增、更新或刪除內容。

      • NoAccess 可防止使用者存取網站集合及內容。 試圖存取網站的使用者會收到拒絕存取訊息。

如需有關如何用 Set-SPSite Cmdlet 的詳細資訊,請參閱 Set-SPSite

另請參閱

概念

在 SharePoint Server 中建立、編輯和刪除配額範本

其他資源

SharePoint 規劃指南