Delete a service application (SharePoint Foundation 2010)
Applies to: SharePoint Foundation 2010
You can delete a service application by using SharePoint Central Administration or by using Windows PowerShell 2.0 cmdlets. Be aware that the act of deleting a service application is permanent—you cannot undo this operation.
Before you delete a service application, verify that its removal will not adversely affect users. As a best practice, you should ensure that no Web applications are currently consuming the service application that you are going to delete. For information about how to disconnect a service application from a Web application, see Add or remove a service application connection to a Web application (SharePoint Foundation 2010).
When you delete a service application, you have the option to also delete the service application database (not all service applications have databases). If the service application is to be re-created in the future, do not delete the service application database. On the other hand, if the service application is temporary, you will most likely want to delete the database during this operation.
To ensure that the service application is available for potential future use, consider backing up the service application before you delete it. For more information, see Back up a service application (SharePoint Foundation 2010) and Restore a service application (SharePoint Foundation 2010).
In this article:
To delete a service application by using Central Administration
To delete a service application by using Windows PowerShell
To delete a service application by using Central Administration
Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
On the SharePoint Central Administration Web site, click Application Management, and then click Manage service applications.
On the Manage Service Applications page, click the row that contains the service application that you want to delete. The ribbon becomes available.
On the ribbon, click Delete.
In the confirmation dialog box, select the check box next to Delete data associated with the Service Applications if you want to delete the service application database. If you want to retain the database, leave this check box cleared.
Click OK to delete the service application, or click Cancel to stop the operation.
To delete a service application by using Windows PowerShell
Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
On the Start menu, click All Programs.
Click Microsoft SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.
At the Windows PowerShell command prompt, type the following commands.
To retrieve the service application that you want to delete, type the following command:
$spapp = Get-SPServiceApplication -Name "<Service application display name>"
Where <Service application display name> is the display name of the service application that you want to delete.
The service application information will be stored in the $spapp variable.
Important
You must type the display name within quotation marks, and what you type must exactly match the service application display name. This includes capitalization. It is strongly recommended that you do not create multiple service applications that have the same display name—if you do have this situation, you can use the Get-SPServiceApplication cmdlet to list all service applications. You can then use the service application GUID together with the –Identity parameter to specify the service application that you want to delete. For more information, see Get-SPServiceApplication.
To delete the selected service application, run one of the following commands. In both cases, you are prompted to confirm the deletion.
To delete the selected service application without removing the service application database, type the following command:
Remove-SPServiceApplication $spapp
To delete the selected service application and also delete the service application database, type the following command:
Remove-SPServiceApplication $spapp -RemoveData
Example
$spapp = Get-SPServiceApplication -Name "Contoso BDC Service"
Remove-SPServiceApplication $spapp -RemoveData
ConfirmAre you sure you want to perform this action? YPerforming operation "Remove-SPServiceApplication" on Target
In this example, the service application "Contoso BDC Service" information is stored in the $spapp variable. After the action is confirmed, the service application and its database are permanently deleted.
For more information, see Get-SPServiceApplication and Remove-SPServiceApplication.