How to Check the Crawl Status of a Content Source

A PowerShell script to save time

Agnes Molnar

by Agnes Molnar on 4/23/2014

Share this:

Article Details

Date Revised:

I work with SharePoint FAST search a lot. I have l a lot of tasks that require me to sit on the F5 key during crawling to check the status. Has it started? Is it still crawling? Has it finished yet?

I have to hit F5 every minute. I'm too lazy, so I decided to write a PowerShell script that does nothing but check the crawl status of a Content Source and write it to the console to me. And I can work on my second screen while it's working and working and working -- without touching F5.

The script is pretty easy: 

$SSA = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application" $ContentSource = $SSA | Get-SPEnterpriseSearchCrawlContentSource -Identity "My Content Source" 
do { Write-Host $ContentSource.CrawlState (Get-Date).ToString() "-" $ContentSource.SuccessCount "/"$ContentSource.WarningCount "/" $ContentSource.ErrorCount Start-Sleep 5 } while (1) 

Yes, it works fine for FAST (FS4SP) Content Sources, too.

Topic: Search

Sign in with

Or register