Versioning on lists can also be Enabled/Disabled using PowerShell. I have used this CSOM PowerShell function to enable versioning on a custom list. Since its a CSOM you need not run this on server, i.e. you can execute this function remotely provided you have installed Client APIs
Try{
Add-Type -Path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll'
Add-Type -Path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll'
Add-Type -Path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Publishing.dll'
Add-Type -Path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Taxonomy.dll'
}
catch {
Throw "Unable to load SharePoint Client runtime"
}
function Enable-VersioningOnList()
{
param(
[Parameter(Mandatory=$true)][string]$url,
[Parameter(Mandatory=$true)][System.Net.NetworkCredential]$credentials,
[Parameter(Mandatory=$true)][string]$listName
)
begin{
try
{
#get Client Object
$context = New-Object Microsoft.SharePoint.Client.ClientContext($url)
$context.Credentials = $credentials
$web = $context.Web
$context.Load($web)
$context.ExecuteQuery()
#Retrieve List
$List = $context.Web.Lists.GetByTitle($listName)
$context.Load($List)
$context.ExecuteQuery()
}
catch
{
Write-Host "Error while getting context. Error -->> " + $_.Exception.Message -ForegroundColor Red
}
}
process{
try
{
# To disable use $false else if to enable use $true
$list.EnableVersioning = $true
$list.Update()
$context.ExecuteQuery()
Write-Host "Versioning enabled on " $List.Title " successfully" -ForegroundColor Green
}
catch
{
Write-Host "Error while disabling versioning. Error -->> " + $_.Exception.Message -ForegroundColor Red
}
}
end{
$context.Dispose()
}
}
Usage:
$credentials = Get-Credential
Enable-VersioningOnList "http://yoursite" $credentials "ListTitle"