title | description | services | author | manager | ms.service | ms.topic | ms.date | ms.author | ms.custom |
---|---|---|---|---|---|---|---|---|---|
Upgrade a Service Fabric application in PowerShell |
Azure PowerShell Script Sample - Upgrade and monitor an Azure Service Fabric application using PowerShell. |
service-fabric |
athinanthny |
chackdan |
service-fabric |
sample |
01/18/2018 |
atsenthi |
mvc, devx-track-azurepowershell |
This sample script upgrades a running Service Fabric application instance to version 1.3.0. The script copies the new application package to the cluster image store, registers the application type, and removes the unnecessary application package. The script starts a monitored upgrade and continuously checks the upgrade status until the upgrade completes or rolls back. Customize the parameters as needed.
If needed, install the Service Fabric PowerShell module with the Service Fabric SDK.
[!code-powershellmain]
This script uses the following commands. Each command in the table links to command specific documentation.
Command | Notes |
---|---|
Get-ServiceFabricApplication | Gets all the applications in the Service Fabric cluster or a specific application. |
Get-ServiceFabricApplicationUpgrade | Gets the status of a Service Fabric application upgrade. |
Get-ServiceFabricApplicationType | Gets the Service Fabric application types registered on the Service Fabric cluster. |
Unregister-ServiceFabricApplicationType | Unregisters a Service Fabric application type. |
Copy-ServiceFabricApplicationPackage | Copies a Service Fabric application package to the image store. |
Register-ServiceFabricApplicationType | Registers a Service Fabric application type. |
Start-ServiceFabricApplicationUpgrade | Upgrades a Service Fabric application to the specified application type version. |
Remove-ServiceFabricApplicationPackage | Removes a Service Fabric application package from the image store. |
For more information on the Service Fabric PowerShell module, see Azure PowerShell documentation.
Additional PowerShell samples for Azure Service Fabric can be found in the Azure PowerShell samples.