Remove-ServiceFabricApplication
Removes a Service Fabric application.
Syntax
Remove-ServiceFabricApplication
[-ApplicationName] <Uri>
[-Force]
[-ForceRemove]
[-TimeoutSec <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-ServiceFabricApplication cmdlet removes an application from Service Fabric.
Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
Examples
Example 1: Remove an application
PS C:\> Remove-ServiceFabricApplication -ApplicationName fabric:/myapp/persistenttodolist -Force
This command removes the application that has the specified URI. Because this command includes the Force parameter, the cmdlet does not prompt you for confirmation before it removes the application.
Parameters
-ApplicationName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric application. To get the names (URI) of the currently deployed applications, use Get-ServiceFabricApplication. The cmdlet removes the application that has the URI that you specify.
Type: | Uri |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-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 |
-ForceRemove
Indicates that this cmdlet forces removal of the application. This should be used only if removal of the application is timing out. It is effectively the same as passing -ForceRemove to each internal remove service call. Refer to ForceRemove Remove-ServiceFabricService cmdlet for more details about force removing the services.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation. If the operation times out, the state of the application is undetermined. Use Get-ServiceFabricApplicationHealth to determine the application state or use the ForceRemove parameter to forcefully remove the application.
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 and no permanent changes are made.
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