Sunday, February 01, 2015

Deleting Service Application Pools in SharePoint 2010

Recently while deleting a service application my system got unresponsive and while trying to create the service application again i constantly got the following error.

“An unhandled exception occurred in the user interface.Exception Information: An object of the type Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool named "SearchServiceApplication" already exists under the parent Microsoft.SharePoint.Administration.SPIisWebServiceSettings named "SharePoint Web Services". Rename your object or delete the existing object.”

This seems to be happening because one of the service application pools were not removed while deleting the service application. This can be removed by using PowerShell.

First load the SharePoint 2010 Management Shell by navigating to Start –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell.

SPStartMenu

Then use the “Get-SPServiceApplicationPool” command to view all the existing service application pools.

Get-SPServiceApplicationPool

Now use the “Remove-SPServiceApplicationPool -Identity SearchServiceApplicationPoolName” command to remove the service application you want removed. If the service application pool’s name is having spaces remember to use double quotes.

Remove-SPServiceApplicationPool -Identity SearchServiceApplicationPool1

PowerShell will ask to confirm the deletion, after confirming the action, it will remove the service application pool.

No comments: