The other day, I was setting up a Project Server 2010 test environment.
Something went wrong while creating the Excel Services service application, and the process never finished. The Excel Services service application did show up however in the Service Application list (but it was stopped and the Proxy hasn’t been created).
I didn’t want to take any risks, and because I could not verify if the service application would function correctly, I decided to delete and recreate the Excel Services service application.
When recreating the Excel Services service application, I used the same name and application pool as before. This resulted in an error however:
Error: An object of the type Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool named “ExcelServicesAppPool” already exists under the parent Microsoft.SharePoint.Administration.SPIisWevServiceSettings named “SharePoint Web Services”. Rename your object or delete the existing object.
But how can I delete this left-over the the previous attempt? Where to delete the application pool? It doesn’t show up in IIS Manager. You can delete the application pool using PowerShell!
•Open the SharePoint 2010 Management Shell with administrator privileges ◦Start ->All Programs -> Microsoft SharePoint 2010 Products -> Right click on SharePoint 2010 Management Shell ->Run as administrator
•Run ‘Get-SPServiceApplicationPool -Identity [Name of the application pool]‘
•Run ‘Remove-SPServiceApplicationPool’ ◦Enter the Identity => this is the name of the application pool
◦Enter ‘Y’ to delete the application pool
You can now recreate the service application using the same names you used before.