SharePoint 2010 - Powershell Script to Disable Versioning on a specific List & Delete Old Versions
This will remove versioning from the list you specify & update every item so that the old versions are deleted.
Great for really large lists/libraries that don't require versioning when you want to free up some space.
$web = get-spweb "http://root/site"
$list = $web.Lists["List Name"]
$list.EnableVersioning = $false
$list.Update()
foreach($item in $list.Items) {
$item.URL;
$item.SystemUpdate();
}
Great for really large lists/libraries that don't require versioning when you want to free up some space.
$web = get-spweb "http://root/site"
$list = $web.Lists["List Name"]
$list.EnableVersioning = $false
$list.Update()
foreach($item in $list.Items) {
$item.URL;
$item.SystemUpdate();
}
Comments
Post a Comment