Pages

Saturday, April 28, 2012

Abandoned or Unused Service Application Pools in SharePoint 2010

Few days back I was given a task to add service account to SharePoint. I started Central Administration and navigated to Security –> Configure Managed Accounts.I clicked on Register New Managed Account to add new account. There i found a normal account that need to be deleted because all services are configured to run with service account. But when i tried to delete that account , error message was displayed with one Application Pool mentioned. The account was associated with this application pool but this application pool was not present in IIS. It seems the application pool was created some time but never used. I tried to find out the application pool but failed.

I searched on Google and checked many sites then i came across one site where i found my solution. (Sorry but i don’t remember the site URL) . So solution for this problem was very simple which is as mentioned below :-

1.) Start SharePoint Management PowerShell.

2.) Type below command. It will return you list of all SharePoint Application pools with Name, Associated user Id etc.

       GET-SPServiceApplicationPool

3.) Identify the application pool that was mentioned in error message and verify the associated ID.

4.) This command can be used to get GUID of service application pool to use with Remove command or Remove command can be used directly.

      GET-SPServiceApplicationPool –Identity <Service Application Pool Name>

5.) Use below command to remove service application pool.

     Remove-SPServiceApplicationPool –identity <GUID received in previous step>

                                       OR

    Remove-SPServiceApplicationPool <Service Application Pool Name>

6.) Confirmation to delete will be prompted and application pool will be deleted.

 

NOTE :- This command will permanently delete the service application pool so please make sure you are deleting correct service application pool.