A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Monday, September 3, 2012

Delete managed account in SharePoint 2010

Sometimes when you are trying to delete a managed account from the SharePoint, you get an error message that account is still being used therefore it cannot be deleted. If this account is being used and is not visible to the naked eye then chances are it is being used in an application pool. Good thing is that error message shows you the pools that are still using this account. You go to IIS and search for the pools, you don’t find them. Use PowerShell to resolve the issue. Here is the error message:

Delete Managed Account in SharePoint 2010 
1.       Open SharePoint 2010 Management Shell and run following command to remove the culprit pool.

Remove-spserviceapplicationpool –identity <pool name>

2.       Now add the pool back with new managed account so that you can delete the old managed account.

New-spserviceapplicationpool –name <pool name> -account  <domain\user>

To confirm if the pool has been created or not, use the following command:

Get-spserviceapplicationpool –identity <pool name>