How to view the status of the SharePoint 2013 search service

As promised at the SharePoint Conference, here is a useful script that gives you the status of the search service in SharePoint Server 2013.

The script provides the following information:

  • Key topology status data from Get-SPEnterpriseSearchStatus
  • Information about primary role for index and admin components
  • Job status for jobs run by the Analytics Processing Component
  • Detailed indexer information
    • Re-partitioning status/progress
    • Master merge in progress
    • Index replica out of sync
  • Crawl status (crawling/idle/paused)
  • Number of indexed documents
  • HA status for topology, indicating which components/partitions that does not have active redundant components
  • Host controller repository status (for search dictionaries)
  • Overall indication of system health for the search topology