I had a huge farm environment in SPS 2003 recently i migrated my older environment 2003 that was externally hard coded by the designers(Template was different as compare to default template in SPS 2003)in to MOSS using gradual upgarade method(Using stsadm command). Everything goes fine but in document libraries of many site collection along with the root site, Version checking is disable , and its very difficult for me to check each and every site collection and document library and enable the version checking option after going to the settings of document library .

Is there any way or method where i can directly run a script and automatically get enabled in every document library in my SharePoint farm.

Kindly suggest.

1 Answer 1


That is a job for a powershell script (Yes, you can use Powershell in 2007, you just have to do it without the Get-SP... cmdlets). Get a handle to the site collection, then iterate through all of the lists in all of the webs and set the various versioning properties to what you are expecting (there are three or four properties related to versioning). Be sure to call .Update() for each list when you enable the versioning.

However, SharePoint has a lot of hidden lists that you probably don't want to mess with so you might also want to make sure that the List you are looking at is not .Hidden and that it is not in _catalogs.

Here is the rough shell of the powershell script you would probably need :


$site = [Microsoft.SharePoint.SPSite]("http://UrlToSiteCollectionRoot/")

$site.AllWebs | % {
    $_.Lists | % {
        # make sure it is not .Hidden and in _catalogs
        # set the versioning properties you want

  • Is there any way to do it from central admin or MOSS UI ??
    – dharmesh
    Commented Sep 27, 2012 at 10:45
  • No. The UI will let you set versioning but you must do it on each list manually and there is nothing for this in Central Administration.
    – Dave Wise
    Commented Sep 27, 2012 at 14:52
  • But manually we are able to see the version option but when we go to the particular document we still unable to see the version option i think this is happening because of the template issue ?
    – dharmesh
    Commented Sep 28, 2012 at 14:25
  • Version History for an item is available in the dropdown that appears when you hover over the title of a document in a list in SharePoint. It also is on the ribbon of the properties page when you select 'View Properties'
    – Dave Wise
    Commented Sep 28, 2012 at 14:30
  • In view properties i can see versioning option but after hovering the document in the drop down menu its showing every thing except version option..
    – dharmesh
    Commented Oct 1, 2012 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.