在 SharePoint Server 中設定共同撰寫的版本控制期間Configure the co-authoring versioning period in SharePoint Server

摘要:了解如何指定 SharePoint Server 2013 儲存正在編輯文件的版本的頻率。Summary: Learn how to specify how often SharePoint Server 2013 stores a version of a document that is being edited.

指定 CoauthoringVersionPeriod 屬性以分鐘為單位,SharePoint 多久儲存正在編輯文件的版本。本文說明如何使用 Microsoft PowerShell 設定 CoauthoringVersionPeriod 屬性。如需文件庫版本設定的詳細資訊,請參閱 < Configure SharePoint 2013 中的共同撰寫的版本設定The CoauthoringVersionPeriod property specifies, in minutes, how often SharePoint stores a version of a document that is being edited. This article describes how to use Microsoft PowerShell to configure the CoauthoringVersionPeriod property. For more information about document library versioning, see Configure versioning for co-authoring in SharePoint 2013.

在 SharePoint Server 2013 中設定共同撰寫的版本控制期間Configure the co-authoring versioning period in SharePoint Server 2013

已開啟版本設定、 SharePoint Server 2013 會定期快照的文件、 另存自訂供日後參考。這項資訊可提供可能會有幫助看不到 [誰已變更的文件復原至較早版本,或基於規範理由而編輯記錄。When versioning is turned on, SharePoint Server 2013 takes periodic snapshots of documents, saving them for later reference. This information can provide an edit trail that may be useful for seeing who changed a document, rolling back to an earlier version, or for compliance reasons.

您可以使用 Microsoft PowerShell 設定 CoauthoringVersionPeriod 屬性。如果值設為 0、 SharePoint Server 2013 擷取每個不同版本的文件中的新使用者所做的變更。如果值設定為極大的數字、 SharePoint Server 2013 會建立一個版本的整個編輯工作階段。此後面的行為會比對未共同撰寫的檔案與檔案所建立的較早版本的 SharePoint Server 2013 或 SharePoint Foundation 的行為。You can configure the CoauthoringVersionPeriod property by using the Microsoft PowerShell. If the value is set to 0, SharePoint Server 2013 captures every change made by a new user in a different version of the document. If the value is set to a very large number, SharePoint Server 2013 creates one version for the whole editing session. This latter behavior matches the behavior of files that are not co-authored and files that were created in earlier versions of SharePoint Server 2013 or SharePoint Foundation.

使用 Windows PowerShell (儲存為指令碼並執行指令碼) 設定共同撰寫的版本控制期間To configure the co-authoring versioning period by using Windows PowerShell (save as script and run script)

  1. 確認您具備下列成員資格:Verify that you have the following memberships:

    • SQL Server 執行個體上的 securityadmin 固定伺服器角色。securityadmin fixed server role on the SQL Server instance.

    • 所有要更新之資料庫上的 db_owner 固定資料庫角色。db_owner fixed database role on all databases that are to be updated.

    • 正在執行 PowerShell Cmdlet 之所在伺服器上的系統管理員群組。Administrators group on the server on which you are running PowerShell cmdlets.

      系統管理員可以使用 Add-SPShellAdmin Cmdlet 授與使用 SharePoint Server 2013 Cmdlet 的權限。An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server 2013 cmdlets.

      注意

      [!附註] 如果您不具備上述權限,請連絡安裝程式系統管理員或 SQL Server 系統管理員要求權限。如需 PowerShell 權限的其他資訊,請參閱<權限>與<Add-SPShellAdmin>。If you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about PowerShell permissions, see Permissions and Add-SPShellAdmin.

  2. 將下列程式碼貼到 [記事本] 等文字編輯器:Paste the following code into a text editor, such as Notepad:

    $siteurl ="<ServerName>" 
    $mysite=new-object Microsoft.SharePoint.SPSite($siteurl)
    $mysite.WebApplication.WebService.CoauthoringVersionPeriod = <Time>
    $mysite.WebApplication.WebService.Update()
    
  3. 指定下列參數:Specify the following parameters:

    設定共同撰寫版本設定期間參數Parameters to configure the co-authoring versioning period

參數Parameter Value
伺服器名稱ServerName
伺服器名稱Server name
TimeTime
以分鐘為單位的數字Number in minutes
  1. 儲存檔案並新增 .ps1 副檔名,例如 SuggestedNameOfFile.ps1。Save the file and add the .ps1 extension, such as SuggestedNameOfFile.ps1.

    注意

    [!附註] 您可以使用不同的檔案名稱,但是必須將檔案儲存為副檔名為 .ps1 的 ANSI 編碼文字檔。You can use a different file name, but you must save the file as an ANSI-encoded text file whose extension is .ps1.

  2. 系統管理員身分啟動 SharePoint 2013 管理命令介面。Start the SharePoint 2013 Management Shell as Administrator.

  3. 變更至您儲存檔案的目錄。Change to the directory to which you saved the file.

  4. 在 PowerShell 命令提示字元處,輸入下列命令:At the PowerShell command prompt, type the following command:

    ./SuggestedFileName.ps1
    

另請參閱See also

概念Concepts

在 SharePoint 2013 中設定共同撰寫的版本設定Configure versioning for co-authoring in SharePoint 2013

SharePoint Server 中的共同撰寫概觀 (英文)Overview of co-authoring in SharePoint Server