PowerShell script to set crawl status as idle
You may face issue sometimes in crawl component configuration of SharePoint 2010/2013 Search. If you change any configuration of crawl, you must run full crawl once, or else it will throw error in backup operation. If a crawler is in running state, it will not allow you to change scope or sites url. To set the crawl status of a search service write search service name in below script
Get-SPEnterpriseSearchCrawlContentSource -SearchApplication
"Search Service Application" | ForEach-Object {
if
($_.CrawlStatus -ne "Idle")
{
Write-Host
"Stopping currently running crawl for content source $($_.Name)..."
$_.StopCrawl()
do {
Start-Sleep -Seconds 1 }
while
($_.CrawlStatus -ne "Idle")
}
}
No comments:
Post a Comment