In the process of configuring application services some time we end up with corrupted service applications in SharePoint 2013. Now I would like to walk you through 3 approaches we can follow to delete the corrupted / not used service applications in SharePoint 2013. The same way we can delete corrupted service applications in SharePoint 2016. If you are new to SharePoint 2016, you can download a FREE SharePoint 2016 PDF Installation guide. Below three different ways:
– Delete from Central Administration
– PowerShell commands
– STSADM commands
SharePoint 2016 Tutorial Contents
Delete Corrupted Service Application from Central Administration:
This approach is simple and straight forward. Follow the below steps to delete the service application from Central administration.
1. Log-on to application server with FARM admin account
2. Open Central Administration and click on “Manage Service Applications” under Application Management
3. Select the required service application to be deleted (ex: Excel Services Application) and click on delete from the ribbon control.
4. Select the Checkbox “Delete data associated with the Service Application”.
Note: This will delete all the data associated with it and can’t be restored back
5. Once the Service Application is deleted it will show you a confirmation message as below. Click on OK / Cancel to close the model dialogue.
Deleted Corrupted Service Applications using PowerShell Commands:
Sometimes the first approach / Central administration will take long time and end up with timeout errors. In this second approach we are deleting Service application using PowerShell Commands referring to GUID of service application. You can run, debug and test PowerShell script using Windows PowerShell ISE.
1. Log-on Application Server
2. Open “SharePoint Management Shell” as administrator
3. Execute the below command to list all the existing service applications with their GUID’s
4. Identify the required service application to be deleted as shown in the above screen shot.
5. Execute the below command to delete / remove the service application, this step might take 10 to 15 min time.
“Remove-SPServiceApplication –Identity <GUID>”
Deleted Corrupted Service Application using STSADM Commands:
Sometimes the above the 2 approaches might take long time. The last and dirty work around is STSADM commands.
In this approach also we will have to follow step1 to stp4 from 2nd approach to get the service application GUID to delete service application.
Execute the below command to delete the service application.
stsadm -o deleteconfigurationobject –id <GUID>
Enjoy administration in SharePoint !!!!