Remove-ServiceFabricClusterPackage

Removes a Service Fabric cluster package from the image store.

Syntax

Remove-ServiceFabricClusterPackage
      [-Code]
      -CodePackagePathInImageStore <String>
      [-ClusterManifestPathInImageStore <String>]
      [-ImageStoreConnectionString <String>]
      [-CertStoreLocation <StoreLocation>]
      [-TimeoutSec <Int32>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-ServiceFabricClusterPackage
      [-Config]
      [-CodePackagePathInImageStore <String>]
      -ClusterManifestPathInImageStore <String>
      [-ImageStoreConnectionString <String>]
      [-CertStoreLocation <StoreLocation>]
      [-TimeoutSec <Int32>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-ServiceFabricClusterPackage
      -CodePackagePathInImageStore <String>
      -ClusterManifestPathInImageStore <String>
      [-ImageStoreConnectionString <String>]
      [-CertStoreLocation <StoreLocation>]
      [-TimeoutSec <Int32>]
      [-WhatIf]
      [-Confirm]
      [<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.

Parameters

-CertStoreLocation

{{Fill CertStoreLocation Description}}

Type:StoreLocation
Accepted values:CurrentUser, LocalMachine
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Code

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

Type:SwitchParameter
Position:Named
Default value:None
Required:True
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
Required:True
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
Required:True
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
Required:False
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
Required: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
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object