Sunday, January 29, 2017

EnableVersioning at site collection level

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"
    }
}

Select and Delete text vertically in bigger text OR flat file

If you want to Select and Delete text vertically in bigger text OR any flat file use below command to do it. Example below: A BCEDF CDEF...