Start The Incremental Crawl In SharePoint 2013 Using PowerShell

Steps
  1. Open your SharePoint Management Shell.
  2. Copy the below code and paste it there.
  3. Run the below code to delete the SharePoint Search component.
Code
  1. $SearchServiceApplication = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"  
  2. #Get the Local SharePoint sites content source  
  3. $ContentSource = $SearchServiceApplication | Get-SPEnterpriseSearchCrawlContentSource -Identity "CustomCrwalComponent"  
  4. #Check if Crawler is not already running or Idle  
  5. if($ContentSource.CrawlState -eq "Idle")  
  6. {  
  7.    Write-Host "Incremental Crawl Starts..."  
  8.    $ContentSource.StartIncrementalCrawl()  
  9. }  
  10. else  
  11. {  
  12.    Write-Host " Crawl is already starts!"  
  13.    Write-Host "ContentSourceName: ", $ContentSource.Name, " - ", $ContentSource.CrawlStatus  
  14. }  
Thanks for reading this blog.
Ebook Download
View all
Learn
View all