[Service Fabric] Connecting to a remote Azure Service Fabric cluster using PowerShell

If you have struggled with getting the syntax and parameters correct on the Connect-ServiceFabricCluster PowerShell cmdlet like I have, I've decided to post the command with associated parameters that I know works every time.

This command is typically used to test connectivity from your personal machine to a .X509 secured cluster in Azure.

$ClusterName= "<your-full-cluster-name>:19000"

$CertThumbprint= "<your-certificate-thumbprint>"

Connect-ServiceFabricCluster -ConnectionEndpoint $ClusterName -KeepAliveIntervalInSec 10 `    -X509Credential `

    -ServerCertThumbprint $CertThumbprint  `

    -FindType FindByThumbprint `

    -FindValue $CertThumbprint `

    -StoreLocation CurrentUser `

    -StoreName My

Upon successful connection, you should see something similar to

clip_image001

Hope this helps you in your work with Azure Service Fabric!

Comments

  • Anonymous
    January 26, 2017
    Thank you, that helped a lot!