Get-ServiceFabricImageStoreContent

Gets image store content information

Syntax

Get-ServiceFabricImageStoreContent
   -ApplicationTypeName <String>
   [-ApplicationTypeVersion <String>]
   [-ImageStoreConnectionString <String>]
   [-CertStoreLocation <StoreLocation>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]
Get-ServiceFabricImageStoreContent
   [-RemoteRelativePath <String>]
   [-ImageStoreConnectionString <String>]
   [-CertStoreLocation <StoreLocation>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]

Description

The Get-ServiceFabricImageStoreContent cmdlet gets information about image store content. You can also get more specific information either by using the image store relative path or by specifying the application type/version. The image store contains packages that are uploaded by the users using Copy-ServiceFabricApplicationPackage and then some reserved folders. "Store" is one such reserved folders which contains deployable versions of the packages maintained by Service Fabric which are created when application types are registered using Register-ServiceFabricClusterPackage. Unregister-ServiceFabricApplicationType unregisters an application type and removes the deployable version of the package from "Store" folder. To delete the application packages that are uploaded use Remove-ServiceFabricApplicationPackage cmdlet.

Looking at the image store content can be useful when you are diagnosing issues with image store or with any of the cmdlets mentioned above.

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: Get image store content by application type/version

PS C:\> Get-ServiceFabricImageStoreContent -ApplicationTypeName "CalcServiceApp" -ApplicationTypeVersion "2.0.0" -ImageStoreConnectionString "fabric:ImageStore"

This command gets information about image store content belonging to the application CalcServiceApp, type version 2.0.0.

Example 2: Get image store content by relative path

PS C:\> Get-ServiceFabricImageStoreContent -RemoteRelativePath "Store\CalcServiceApp\apps" -ImageStoreConnectionString "fabric:ImageStore"

This command gets information about image store content within the specified image store relative path "Store\CalcServiceApp\apps".

Example 3: Get image store content on the root

PS C:\> Get-ServiceFabricImageStoreContent -ImageStoreConnectionString "fabric:ImageStore"

This command gets information about image store content from the root containing uploaded packages and reserved folders.

Example 4: Get image store content on the root without specifying ImageStoreConnectionString

PS C:\> Get-ServiceFabricImageStoreContent

This command gets information about image store content as above for the "ImageStoreConnectionString" obtained from the connected cluster's connection string.

Required Parameters

-ApplicationTypeName

Specifies the name of a Service Fabric application type. The cmdlet returns information about each file/folder in that application type such as "StoreRelativePath", "Type" (File/Folder), "FileSize", "ApplicationVersion" , "ServiceManifestName", "ServiceManifestVersion" and other information whichever is applicable for that file/folder.

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

Optional Parameters

-ApplicationTypeVersion

Specifies the version of a Service Fabric application type. When this is not specified then all versions of that application type are listed.

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

Specifies the location of the X.509 certificate store in the registry. The certificate location may be needed for decrypting the encrypted "ImageStoreConnectionString" in the connected cluster. The expected value is CurrentUser or LocalMachine.

Type:StoreLocation
Parameter Sets:CurrentUser, LocalMachine
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ImageStoreConnectionString

Specifies the connection string for the Service Fabric image store. If this is not specified, the connection string from the connected cluster is used.

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

Specifies the relative path to the image store root. Application packages are uploaded to image store to the location specified by parameter ApplicationPackagePathInImageStore in cmdlet Copy-ServiceFabricApplicationPackage. If Copy-ServiceFabricApplicationPackage doesn't specify the parameter, it is defaulted to the folder name and placed under image store root. One of the reserved folder "Store" under image store root contains deployable version of the packages which are created using Register-ServiceFabricClusterPackage.

Type:String
Position:Named
Default value:None
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

Inputs

None

The cmdlet Get-ServiceFabricStoreContent accepts string instances of a Service Fabric application type; the version of an application type; or the image store relative path.

Outputs

None

The cmdlet Get-ServiceFabricStoreContent returns instances of the System.Fabric.Management.ImageStore.ImageStoreFile object and/or the System.Fabric.Management.ImageStore.ImageStoreFolder object.