Remove-ServiceFabricServiceGroup
Removes a Service Fabric service group.
Syntax
Remove-ServiceFabricServiceGroup
[-ServiceName] <Uri>
[-Force]
[-TimeoutSec <Int32>]
[-WhatIf]
[-Confirm]
[<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.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | 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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric service group.
Type: | Uri |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.Uri
Outputs
System.Object