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 for Azure PowerShell works only for PowerShell 5.1 on Windows. 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
Azure PowerShell for Windows is installed using the MSI file available from
GitHub. If you have installed earlier
versions of Azure modules as an MSI, the installer automatically removes them. The MSI package installs
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.