How can I get the date of the last Full Crawl in Sharepoint 2010 using Powershell? -


i can run following current crawls , there determine last crawl completed date.

# search app sharepoint $searchapp = get-spenterprisesearchserviceapplication "my search service" get-spenterprisesearchcrawlcontentsource -searchapplication $searchapp   $contentsource = get-spenterprisesearchcrawlcontentsource "mycrawl" -searchapplication $searchapp $contentsource.crawlcompleted 

but last time any crawl completed. want date of last full crawl.

i can see information in crawl history. when try , crawl history (see http://blogs.msdn.com/b/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx) using below don't seem object can work (its 1 big string container far can tell) , full of ids.

 $s = new-object microsoft.sharepoint.spsite("http://portal");  $c = [microsoft.office.server.search.administration.searchcontext]::getcontext($s);  $h = new-object microsoft.office.server.search.administration.crawlhistory($c)  

i hoping object represents crawl history filter on crawl name , type = full.

i have searched around , can't find answer anywhere. (note crawlhistory class being deprecated).

any thoughts/suggestions?

you're close. need call this: $h.getcrawlhistory() , parse it.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -