We can use the bele PowerShell script to enable versioning at site collection level,
Add-PSSnapin microsoft.sharepoint.powershell
-ErrorAction SilentlyContinue
$web =
get-spweb "site coll url"
$lists =
$web.lists
foreach ($list
in $lists)
{
if($list.EnableVersioning -eq
$false)
{
write-host $list.title " is a not
using versions"
$list.Enableversioning
= $true
$List.MajorVersionLimit
= 5
$list.update()
}
else
{
Write-host $list.title " is set
for up to " $list.MajorVersionLimit "previous
versions"
}
}
Comments
Post a Comment