Pause The Incremental Crawl In SharePoint 2013 Using PowerShell
In this blog, you will learn about how to pause the incremental crawl in SharePoint, using PowerShell, and it will be useful for SharePoint admins.
Steps
- Open your SharePoint Management Shell.
- Copy the code given below and paste it there.
- Run the code given below to delete SharePoint search component.
Code
- $SearchServiceApplication = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"
-
- #Get the Local SharePoint sites content source
- $ContentSource = $SearchServiceApplication | Get-SPEnterpriseSearchCrawlContentSource -Identity "CustomCrwalComponent"
-
- #Check if Crawler is not already running or Idle
- if($ContentSource.CrawlState -eq "Idle")
- {
-
- Write-Host "Incremental/Full Crawl Starts..."
-
- }
- else
- {
- $ContentSource.PauseCrawl()
-
-
- }
Thanks for reading this blog.