Configure the co-authoring versioning period (SharePoint Foundation 2010)

SharePoint 2010

Si applica a: SharePoint Foundation 2010

Ultima modifica dell'argomento: 2016-11-30

This article describes how to configure the co-authoring versioning period in Microsoft SharePoint Foundation 2010 by using Windows PowerShell 2,0.

When versioning is turned on, SharePoint Foundation 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.

The coAuthoringVersionPeriod property specifies how often SharePoint stores a version of a document that is being edited, measured in minutes. You can configure this property by using the Windows PowerShell. If the value is set to 0, SharePoint Foundation will capture 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 Foundation will create one version for the whole editing session. This latter behavior matches the behavior of files that are not co-authored and files in previous versions of SharePoint Foundation.

Some procedures in this task require using Windows PowerShell or SharePoint 2010 Management Shell to run cmdlets. To run SharePoint 2010 cmdlets in Windows PowerShell, you must add the Microsoft.SharePoint.PowerShell snap-in by using the Add-PSSnapin cmdlet, or you can run the SharePoint 2010 cmdlets by using SharePoint 2010 Management Shell. By default, the Microsoft.SharePoint.PowerShell snap-in is already registered, and the snap-in is added to the SharePoint 2010 Management Shell. To run SharePoint 2010 cmdlets, you must be a member of the SharePoint_Shell_Access role on the configuration database and a member of the WSS_ADMIN_WPG local group on the computer where Prodotti SharePoint 2010 is installed.
For more information about the Add-PSSnapin cmdlet, see Add-PSSnapin. For more information about how to use Windows PowerShell with Prodotti SharePoint 2010, see Amministrazione di prodotti SharePoint 2010 tramite Windows PowerShell.
To configure the co-authoring versioning period by using Windows PowerShell
  1. Using Notepad, open a new a text file and then copy and paste the following script into the file.

    $siteurl ="<ServerName>" 
    $mysite=new-object Microsoft.SharePoint.SPSite($siteurl)
    $mysite.WebApplication.WebService.CoauthoringVersionPeriod = minutes
  2. Specify the following parameters:


    Parameter Value


    Server name


    Number in minutes

  3. Save the file with a .ps1 file name extension to a folder where you run scripts (typically C:\scripts).

  4. From the Windows PowerShell command prompt (that is, PS C:\>), type the following command and press ENTER: