Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question

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.

share|improve this answer
    
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 Jul 17 '12 at 13:58
    
CrawlHistory class is Obsolete, msdn.microsoft.com/en-us/library/… guess for SP2010. –  Karthikeyan Dec 27 '12 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/… –  Suresh Kumar Sep 18 at 3:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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