SharePoint Search Analytics in 2013 Using PowerShell

In SharePoint 2010 and 2013, we can get the analytics data using analystics services application. In this blog, I have given the powershell commands to retrieves the aggregated analytics item data rolled up to a given scope or site collection.
  1.  $searchAnalytics = Get-SPEnterpriseSearchServiceApplication  
  2. $Site = Get-SPSite http://mysite/site  
  3. $result = $searchAnalytics .GetRollupAnalyticsItemData(1,[System.Guid]::Empty,$Site.ID,[System.Guid]::Empty)  
  4. $Date = Get-Date "2014-12-20"  
  5. $result.GetHitCountForDay($Date)  
  6. $result.GetHitCountForMonth($Date)  
Happy SharePointing :-) 

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now