When executing PowerShell against Azure, Octopus Deploy will automatically import the Azure PowerShell modules and Azure CLI, and finally will also authenticate with Azure using the configured Azure Account.
This applies to:
- 'Run an Azure PowerShell Script' steps.
- Scripts packaged or configured with Deploying a package to an Azure Cloud Service or Azure Web App steps.
Choosing the right Azure account type Azure supports two authentication methods, each of which provides access to a different set of Azure APIs:
- To use the Azure Service Management (ASM) API, use an Azure Management Certificate Account.
- To use the Azure Resource Management (ARM) API, use an Azure Service Principal Account. (The ARM PowerShell cmdlets are prefixed with
Learn more about configuring the right Azure Account.
Run an Azure PowerShell script step
Octopus Deploy provides a Run an Azure PowerShell Script step type, for executing PowerShell in the context of an Azure Subscription. For information about adding a step to the deployment process, see the add step section.
Staying up to date
Octopus Deploy ships with a version of the Azure PowerShell Modules and Azure CLI so you can deploy applications as soon as you install Octopus Deploy. Microsoft Azure is changing very quickly, introducing more application services and commands frequently. You can use the built-in cmdlets or/and CLI if they cover everything you need, or you can configure Octopus Deploy to use your own custom version of the Azure PowerShell cmdlets and/or custom version of the Azure CLI.
- Generate an Octopus guide for Azure and the rest of your CI/CD pipeline.
- Configuring the version of the Azure CLI
- Configuring the version of the Azure PowerShell Modules
Need support? We're here to help.