Friday 21 November 2014

How to delete the unused application pool From IIS?

Recently I had issue with user profile service. I delete it and try to recreate it. That time I got an error
"
An object of the type Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool named "User Profile Service App Pool" already exists under the parent Microsoft.SharePoint.Administration.SPIisWebServiceSettings named "SharePoint Web Services".  Rename your object or delete the existing object.
".

So I search for the resolution of the issue. I got two options
1. They say Try a  different name. - Which didn't help in my case.I would say try your luck also.
2. Delete current app pool and try again to create.

So here is the process:

IIS will not provide the interface for managing service application's application pools. But we can delete service application's application pool in SharePoint 2010/2013  using powershell.

Use these below cmd-let to get list of service application's application pools.
Get-SPServiceApplicationPool

SharePoint 2010/2013 delete orphaned application pool: To delete a application pool of service application, use the cmdlet:
Remove-SPServiceApplicationPool

 1. Run "Sharepoint Management Shell " in administrator mode.
 2. Type "Get-SPServiceApplicationPool". It will give you list of app pool.
 3. Type "Remove-SPServiceApplicationPool". 
 4. It will ask you identity. Give the app pool name you want to remove from above list. Try not to make  spell mistake.
 5. Click Enter.
 6.It will ask for confirmation. Type "y". click Enter.
Enjoy.
 




No comments:

Post a Comment