Sometimes you just need to rebuild SharePoint 2010 search.  It happens.  Life happens.  SharePoint 2010 Search poops the bed.  This article will discuss how to remove a SharePoint 2010 search service application and clean up leftover search components.

Search Service Application Removal

So the first thing we need to do is remove the search service application.  This can be done using Central Administration or PowerShell.

Remove With Central Administration

To remove the search service application using Central Administration:

  • Launch Central Administration
  • Navigate to Application Management > Manage Service Applications
  • Click on the search service application so that it’s highlighted.  Do not click on the name of the search service application, as that will take you to search administration.
  • Click the delete button in the top menu ribbon
  • A “Delete Service Application” warning will be displayed.  If you want to keep your search databases, make sure the “Delete data associated with the Service Application” check box is clear.
  • Click OK

Remove With PowerShell

To remove the search service application using PowerShell:

Die Search Die

Sometimes neither of the above methods work and result in timeout and/or error(s).  In this case, the following PowerShell can be used as a final resort:

Stopping Search Components

Once the search service application has been removed, there may be leftover components running the search server(s).

SharePoint Server Search

To ensure this service has stopped on all farm servers:

  • Launch Central Administration
  • Navigate to System Settings > Manage Services On Server
  • Look at each farm server by clicking the server drop down, select “Change Server” then select a different server from the pop-up window
  • If “SharePoint Server Search” is running, it can be stopped by executing the following PowerShell code on the affected server

  • Alternately, to ensure “SharePoint Server Search” is not running on ANY farm server, execute the following PowerShell code from any farm server

Search Query and Site Settings Service

To ensure this service has stopped on all farm servers:

  • Launch Central Administration
  • Navigate to System Settings > Manage Services On Server
  • Look at each farm server by clicking the server drop down, select “Change Server” then select a different server from the pop-up window
  • If the “Search Query and Site Settings Service” is running, click the “Stop” action for the service

Search Administration Web Service

To ensure this service has stopped on all farm servers:

  • Launch Central Administration
  • Navigate to System Settings > Manage Services On Server
  • Change the view drop down from Configurable to All
  • Look at each farm server by clicking the server drop down, select “Change Server” then select a different server from the pop-up window
  • If the “Search Administration Web Service” is running, it can be stopped by executing the following PowerShell code