Remove-​Service​Fabric​Service​Group

Removes a Service Fabric service group.

Syntax

Remove-ServiceFabricServiceGroup
      [-ServiceName] <Uri>
      [-Force]
      [-TimeoutSec <Int32>]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Remove-ServiceFabricServiceGroup cmdlet removes a Service Fabric service group. A service must be running before you can remove it.

To manage Service Fabric clusters, start Windows PowerShell by using the Run as administrator option. Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet and then the Get-ServiceFabricClusterConnection cmdlet.

Examples

Example 1: Remove a service group

PS C:\> Remove-ServiceFabricServiceGroup -ServiceName fabric:/myapp/persistenttodolist/svc1 -Force

This command removes the Service Fabric service group named fabric:/myapp/persistenttodolist/svc1. Because the command specifies the Force parameter, the cmdlet does not prompt you for confirmation.

Required Parameters

-ServiceName

Specifies the Uniform Resource Identifier (URI) of a Service Fabric service group.

Type:Uri
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.Uri

This cmdlet accepts a URI that represents the name of a Service Fabric service group.

Outputs

System.Object

This cmdlet returns the status of the operation as a string.