When working with Central Administration and Service Accounts, you may find application pools listed that no longer exist on the portal. More than likely this was caused by application pools being changed or deleted directly through IIS. Although IIS knows the application pools are gone, SharePoint has no idea.
Fortunately, PowerShell can help with this. Fire up PowerShell and enter the following:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $WebApp = Microsoft.SharePoint.Administration.SPWebApplication]::Lookup ('http://<em>your_portal</em>') $WebApp.WebService.ApplicationPools | select Name,Id | format-table -auto
This will show you a list of what application pools SharePoint has configured. To get rid of an orphaned application pool, perform the following:
To confirm the object was deleted, re-run
$WebApp.WebService.ApplicationPools | select Name,Id | format-table -auto