Share via


Remove-ServiceFabricClusterPackage

Removes a Service Fabric cluster package from the image store.

Syntax

Code

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

Config

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

Both

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}}

Parameter properties

Type:StoreLocation
Default value:None
Accepted values:CurrentUser, LocalMachine
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Code
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Code

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Code
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Code
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Both
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Config

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Config
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ImageStoreConnectionString

Specifies the connection string for the Service Fabric image store.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not executed.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Object