am trying to ReIndex a custom splist using powershell [ src link : reindex-pages-lib
add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction
SilentlyContinue
$SiteURL = "http://server001:28516/"
$ListName = "Risk and Issue Log Tracker"
$w = Get-SPWeb $SiteURL
$list = $w.Lists[$ListName]
$versionObj = $list.RootFolder.Properties["vti_searchversion"]
$list.RootFolder.SetProperty("vti_searchversion",
($versionObj + 1));
$list.Update();
but it throws me error:
Some error occured. Object reference not set to an instance of an object.
under what n whic circumstances it will throw errors? when I tried with all the other docu libs and splists, i didnt get this error.
This is happening only for this list!
