Remove-​Service​Fabric​Cluster​Package

Removes a Service Fabric cluster package from the image store.

Syntax

Remove-ServiceFabricClusterPackage
      [-ClusterManifestPathInImageStore <String>]
      [-Code]
      -CodePackagePathInImageStore <String>
      -ImageStoreConnectionString <String>
      [-TimeoutSec <Int32>]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]
Remove-ServiceFabricClusterPackage
      -ClusterManifestPathInImageStore <String>
      [-CodePackagePathInImageStore <String>]
      [-Config]
      -ImageStoreConnectionString <String>
      [-TimeoutSec <Int32>]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]
Remove-ServiceFabricClusterPackage
      -ClusterManifestPathInImageStore <String>
      -CodePackagePathInImageStore <String>
      -ImageStoreConnectionString <String>
      [-TimeoutSec <Int32>]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Remove-ServiceFabricClusterPackage cmdlet removes a Service Fabric cluster package from the image store. Run this cmdlet after you register the package using the Register-ServiceFabricClusterPackage cmdlet.

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, first run the Connect-ServiceFabricCluster cmdlet to establish a connection to the cluster.

Examples

Example 1: Remove a cluster package using both Code and Config option.

PS C:\> Remove-ServiceFabricClusterPackage -ImageStoreConnectionString "xstore:DefaultEndpointsProtocol=https;AccountName=[StorageAccountName];AccountKey=[StorageAccountKey];Container=[ContainerName]" -ClusterManifestPathInImageStore "ClusterManifest_123.xml" -CodePackagePathInImageStore "ServiceFabric.2.0.59.0.msi"

Example 2: Remove a cluster package using the Config option.

PS C:\> Remove-ServiceFabricClusterPackage -Config -ImageStoreConnectionString "xstore:DefaultEndpointsProtocol=https;AccountName=[StorageAccountName];AccountKey=[StorageAccountKey];Container=[ContainerName]" -ClusterManifestPathInImageStore "ClusterManifest_123.xml" -Confirm

Example 3: Remove a cluster package using the Code option.

PS C:\> Remove-ServiceFabricClusterPackage -Code -ImageStoreConnectionString "xstore:DefaultEndpointsProtocol=https;AccountName=[StorageAccountName];AccountKey=[StorageAccountKey];Container=[ContainerName]" -CodePackagePathInImageStore "ServiceFabric.2.0.59.0.msi" -Confirm

This command removes the cluster package that has the specified image store path. The cmdlet does prompt you for confirmation before it removes the cluster package.

Required Parameters

-Code

Indicates that the cmdlet removes only the Service Fabric .msi file.

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

Specifies the relative path in the image store of the code package. The cmdlet removes the package from the path that this parameter specifies.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Config

Indicates that this cmdlet removes only the Service Fabric cluster manifest.

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

Specifies the connection string for the Service Fabric image store.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-ClusterManifestPathInImageStore

Specifies the relative path in the image store of the cluster manifest. The cmdlet removes the package from the path that this parameter specifies.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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
-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 executed.

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

Inputs

None

You cannot pipe input to this cmdlet.

Outputs

System.Object

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