Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

It is probably something easy that I am not seeing, but I created a web application through powershell using the new-spwebapplication command which created an app pool based on the name provided. But I screwed something else up later in the script and wanted to start over. I was able to delete the Web Application through Central Administration, but I cannot get rid of the App Pool that it was assigned to. There are no other Web Applications on the box except the central administration web site. And the managed account says that the Farm component using this account is Microsoft SharePoint Foundation Application Pool: SharePoint - MySites (This is a SharePoint Server Standard installation).

So my question is: How do I list the Application Pools? and How do I remove an Application Pool for a web site; not a service application?

share|improve this question

4 Answers 4

up vote 0 down vote accepted

Have you tried deleting the AppPool using IIS manager? If you right click an AppPool and select View Applications you can see what web site the AppPool is attached to.

share|improve this answer
My only concern there was that SharePoint is the one that deployed this AppPool on all the servers in the farm so I did not want to go around it to remove it. Also I am not sure if deleting through IIS manager if it will let SharePoint know that the apppool is no longer there. –  Anonymous Jun 15 '10 at 12:55
Do not delete SharePoint application pools directly from IIS –  shufler Feb 2 '12 at 22:27

You can delete you content application pool if you have the guid for the app pool in concern.

To get the id:

$applicationPools = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.ApplicationPools

Then remove the app pool using the id:


share|improve this answer

actually the Get-SPServiceApplicationPool only manages service app pools, not those used for content web applications

share|improve this answer

Get-SPServiceApplicationPool lists all of the SharePoint application pools.

To remove one, you would just type:

Get-SPServiceApplicationPool -Identity [name of app pool] | Remove-SPServiceApplicationPool

Run each time Get-SPServiceApplicationPool to verify if it has been deleted

share|improve this answer
Have you actually tried this? I think this only returns Service Application Pools, not Content Application Pools. –  Benjamin J Athawes Jan 29 '14 at 11:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.