Pause The Incremental Crawl In SharePoint 2013 Using PowerShell

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