Remove a Service Application

Scenario/Problem: You need to remove a service application from the current server configuration.

Solution: Use the Remove-SPServiceApplication cmdlet with a service application variable.

The Remove-SPServiceApplication cmdlet enables you to remove a specific service application from the current server. Use this in conjunction with the Get-SPServiceApplication cmdlet (explained in a previous section), as shown in Listing 6.6.

Listing 6.6. Example Configuration Script for Removing a Service Application

$sApp = Get-SPServiceApplication -Identity bc4399ed-a2e0-4397-bf07-cd3d207e630eRemove-SPServiceApplication $sApp

Tip

You may also remove the underlying database and data by using the -RemoveData switch parameter. ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.