Install Azure PowerShell on Windows with MSI
This article explains how to install Azure PowerShell on Windows using an MSI installer. The MSI installer is provided for environments where the PowerShell Gallery may be blocked by a firewall, or an offline installer is needed. The recommended way to install Azure PowerShell is with PowerShellGet. For instructions on using PowerShellGet to install Azure PowerShell, see Install Azure PowerShell with PowerShellGet.
The MSI installer on Windows is designed to install Azure PowerShell for PowerShell 5.1 only. For installation on non-Windows platforms or later versions of PowerShell, Install with PowerShellGet. To check your PowerShell version, run the command:
To use Azure PowerShell in PowerShell 5.1, you need to:
- Update to Windows PowerShell 5.1 if needed. If you're on Windows 10, you already have PowerShell 5.1 installed.
- Install .NET Framework 4.7.2 or later.
Install or update on Windows using the MSI Package
The MSI package for Azure PowerShell is available from GitHub:
- Go to https://github.com/Azure/azure-powershell/releases.
- Look for the most recent Gallery Module for Azure PowerShell (these are listed chronologically and are typically just a release version with no name like "4.7.0").
- Scroll down to the bottom of the patch notes and click on the arrow next to "Assets" to reveal the MSI options.
- Click on the Az-Cmdlets MSI of your choice to start the download.
If you have installed earlier versions of Azure PowerShell using the MSI, the installer
automatically removes them. The MSI package installs modules in
To start working with Azure PowerShell, sign in with your Azure credentials.
# Connect to Azure with an interactive dialog for sign-in Connect-AzAccount
If you've disabled module autoloading, you need to manually import the module with
Import-Module Az. Because of the way the module is structured, this can take up to a minute.
You'll need to repeat this step for every new PowerShell session you start. To learn how to persist your Azure sign-in across PowerShell sessions, see Persist user credentials across PowerShell sessions.
To learn more about the Azure PowerShell modules and their features, see Get Started with Azure PowerShell. If you're familiar with Azure PowerShell and need to migrate from AzureRM, see Migrate from AzureRM to Az.