Force stop and start a full crawl on content sources in SharePoint 2013 using PowerShell
Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object {
if ($_.CrawlStatus -ne "Idle")
{
Write-Host "Stopping running crawl for content source $($_.Name)..."
$_.StopCrawl()
do { Start-Sleep -Seconds 1 }
while ($_.CrawlStatus -ne "Idle")
}
Write-Host "Starting full crawl for content source $($_.Name)..."
$_.StartFullCrawl()
}
For Status
Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | select Name, CrawlStatus
Comments
Post a Comment