Saturday, September 29, 2012

Error When Deleting Search Service Application in SharePoint 2010

Scenario: You attempt to delete your Search Service Application in SharePoint 2010 through Central Admin but the process never completes or takes too long to complete (and does not actually delete the application). You attempt to delete the Search Service Application again through Central Admin but now receive an error.

You then decide PowerShell is next viable option when deleting so you use the following script:

$spapp = Get-SPServiceApplication -Name ""
Remove-SPServiceApplication $spapp -RemoveData


You receive another error and are still unable to delete the Search Service Application.

Fix: STSADM becomes your friend again here. You will first need to grab the GUID for the Search Service Application. You can do this by...

  1. Log into the server hosting Central Admin
  2. Open SharePoint 2010 Management Shell (PowerShell) as Administrator
  3. Enter Get-SPServiceApplication
  4. Find the Service Application you wish to delete and copy the GUID (You can do this by right clicking in the PowerShell window -> hitting Select All -> Control + C -> Right Click and Paste into a fresh Notepad document -> copy the GUID from the application you wish to delete)
  5. While still in PowerShell, type: stsadm -o deleteconfigurationobject -id *type in GUID here*
This will delete your Search Service Application completely!

2 comments:

  1. Good day Rima Reyes,

    This Blog has saved me after weeks of trying to get the Enterprise Search Service deleted.

    Thanks for the help,
    Clinton

    ReplyDelete