I want to get last few crawl log details of all of my content sources through powershell.

Basically, its the search service application -> crawl logs -> crawl history -> for any content source I would like to get last 5 logs. I am not sure which direction I should proceed to get this data:When i say logs, I mean this data

Content Source Crawl started Crawl completed Crawl duration Type Successes Warnings Errors Top Level Errors Deletes Not Modified Security Updates

1 Answer 1


The easiest thing what you can do is export the crawl logs as a csv through the powershell script as mentioned here :- http://blogs.msdn.com/b/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx

Once exported , just fire up Excel and filter the last five. Its rather more flexible working with a csv in excel as you will get many other filter options over your log file.

  • Thanks Moss for replying. I want some kind of monitoring system which just emails me top 5 logs from all my content sources . I don't want to waste my time daily exporting it and then editing it in excel.
    – EVIA
    Commented Jul 17, 2012 at 13:58
  • CrawlHistory class is Obsolete, msdn.microsoft.com/en-us/library/… guess for SP2010. Commented Dec 27, 2012 at 5:41
  • This post makes more sense, which i have tested and seems to be working as expected. cameron-verhelst.be/blog/2014/06/13/…
    – user33542
    Commented Sep 18, 2014 at 3:59
  • what you will give for the url ? Commented Sep 6, 2017 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.