Deploy app to service fabric with PowerShell Deploy app to service fabric with PowerShell powershell powershell

Deploy app to service fabric with PowerShell


Once you have the package build and ready, you can try the below commands in order to deploy the pkg using PowerShell Script.

If you haven't tried the below option, try this and see if it works.

There are few prerequisites that's needed in order to run the script :

  • You have your cluster up and running.

  • Cluster has all necessary certificates deployed (such as for SSLendpoints, if any)

  • You have ARM template and parameters files ready.

  • You have the necessary permissions for deployment of new resources,namely the Contributor role (on the level of subscription or resourcegroup)

  • You have the destination resource group created

Once you check the above, execute the following commands:

Copy-ServiceFabricApplicationPackage

Register-ServiceFabricApplicationType

New-ServiceFabricApplication

If that doesn't work for you, go through the below sites to see if it helps .

Deploy applications using PowerShell

Deploy resources with Resource Manager templates and Azure PowerShell


The problem was that I used wrong ApplicationName and ServiceName in the command New-ServiceFabricService.

In order to find out what correct values are, I ran Get-ServiceFabricApplication and Get-ServiceFabricService.

These pages were very helpful for building troubleshooting the scripts: