Remove-​Service​Fabric​Application

Removes a Service Fabric application.

Syntax

Remove-ServiceFabricApplication
      [-ApplicationName] <Uri>
      [-Force]
      [-ForceRemove]
      [-TimeoutSec <Int32>]
      [-Confirm]
      [-WhatIf]
      [<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.

Required 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: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
-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
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 option to forcefully remove the application.

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 and no permanent changes will be made.

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

Inputs

System.Uri

Outputs

System.Object