Export (0) Print
Expand All

Delete a service application in SharePoint 2013

SharePoint 2013
 

Applies to: SharePoint Server 2013, SharePoint Foundation 2013

Topic Last Modified: 2013-12-18

Summary: Learn how to use Central Administration or Windows PowerShell to delete a service application in SharePoint 2013.

You can delete a service application by using the SharePoint Central Administration website or by using Windows PowerShell 3.0 cmdlets.

CautionCaution:
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 service application connections from a web application in SharePoint 2013.

When you delete a service application, you have the option of also deleting the service application database. Some service applications do not have databases). If you plan to create the service application again in the future, do not delete the service application database. 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 service applications in SharePoint 2013 and Restore service applications in SharePoint 2013.

NoteNote:
Because SharePoint 2013 runs as websites in Internet Information Services (IIS), administrators and users depend on the accessibility features that browsers provide. SharePoint 2013 supports the accessibility features of supported browsers. For more information, see the following resources:
To delete a service application by using Central Administration
  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. On the SharePoint Central Administration website, click Application Management, and then click Manage service applications.

  3. On the Manage Service Applications page, click the row that contains the service application that you want to delete. The ribbon becomes available.

  4. On the ribbon, click Delete.

  5. 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.

  6. Click OK to delete the service application, or click Cancel to stop the operation.


To delete a service application by using Windows PowerShell
  1. Verify that you meet the following minimum requirements:

    • You must have membership in the securityadmin fixed server role on the SQL Server instance

    • You must have membership in the db_owner fixed database role on all databases that are to be updated.

    • You must be a member of the Administrators group on the server on which you are running the Windows PowerShell cmdlet.

    NoteNote:
    If these permissions are not satisfied, contact your Setup administrator or SQL Server administrator to request these permissions.

    For additional information about Windows PowerShell permissions, see Permissions and Add-SPShellAdmin

  2. Start the SharePoint 2013 Management Shell.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, and then click SharePoint 2013 Management Shell.

    • For Windows Server 2012:

      • On the Start screen, click SharePoint 2013 Management Shell.If SharePoint 2013 Management Shell

        is not on the Start screen:

      • Right-click Computer, click All apps, and then click SharePoint 2013 Management Shell.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following commands.

  4. 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.

    ImportantImportant:
    You have to type the display name within quotation marks, and you have to type the exact service application display name. This includes capitalization. We recommend 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 and the –Identity parameter to specify the service application that you want to delete. For more information, see Get-SPServiceApplication.
  5. To delete the selected service application, run either 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
      

$spapp = Get-SPServiceApplication -Name "Contoso BDC Service"
Remove-SPServiceApplication $spapp -RemoveData

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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft