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.
$sApp = Get-SPServiceApplication -Identity bc4399ed-a
2e0-4397-bf07-cd3d207e630e
Remove-SPServiceApplication $sApp
Tip
You may also remove the underlying database and data by using the -RemoveData
switch parameter. Only use this if you are no longer using the service application on the farm.
18.118.1.232