Follow by Email

Tuesday, November 1, 2016

SharePoint Search index reset for a specific content source

#This script will remove and re-add your content source’s start addresses.
#when the next full crawl is started for the content source, SharePoint will rebuild the index.
$sourceName = “Content Source Name
$SSA = Get-SPEnterpriseSearchServiceApplication
$source = Get-SPEnterpriseSearchCrawlContentSource -Identity $sourceName -SearchApplication $SSA
$startaddresses = $source.StartAddresses | ForEach-Object { $_.OriginalString }
$source.StartAddresses.Clear()
ForEach ($address in $startaddresses ){ $source.StartAddresses.Add($address) }

Note: Replace content source name which is in bold.

No comments:

Post a Comment