Hello @senglory ,
Powershell works by either the -param:value or -param(space)value syntax. So either of the following should work:
Get-ServiceFabricImageStoreContent -ImageStoreConnectionString:"file:C:\SfDevCluster\Data\ImageStoreShare"
or
Get-ServiceFabricImageStoreContent -ImageStoreConnectionString "file:C:\SfDevCluster\Data\ImageStoreShare"
The connection string is the above as this is a dev cluster. Azure clusters always have this set to "fabric:ImageStore".
Although when in doubt, you can always verify the value of ImageStoreConnectionString
by retrieving the Service Fabric cluster manifest for the current connection with the Get-ServiceFabricClusterManifest cmdlet.
This should simplify it all even further:
Get-ServiceFabricImageStoreContent -ImageStoreConnectionString (Get-ImageStoreConnectionStringFromClusterManifest(Get-ServiceFabricClusterManifest))
Note:
The Get-ImageStoreConnectionStringFromClusterManifest
cmdlet, which is part of the Service Fabric SDK PowerShell module, is used to get the image store connection string. To import the SDK module, run:
Import-Module "$ENV:ProgramFiles\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1"
For additional reading, please check: