description | ms.custom | ms.devlang | ms.service | ms.topic | title | zone_pivot_group_filename | zone_pivot_groups |
---|---|---|---|---|---|---|---|
Learn how to install and run Azure PowerShell on Windows. You can install Azure PowerShell on Windows with one command. |
devx-track-azurepowershell |
powershell |
azure-powershell |
conceptual |
Install Azure PowerShell on Windows | Microsoft Docs |
azure/zone-pivot-groups.json |
install-azps-windows |
The Az PowerShell module is a rollup module. Installing the Az PowerShell module downloads the generally available modules and makes their cmdlets available for use.
The recommended installation method and PowerShell version for the Az PowerShell module:
- Install from the PowerShell Gallery
- Use with PowerShell version 7 or higher
::: zone pivot="windows-psgallery"
This article explains how to install the Az PowerShell module on Windows from the PowerShell Gallery.
-
Run the following command from PowerShell to determine your PowerShell version:
$PSVersionTable.PSVersion
-
Determine if you have the AzureRM PowerShell module installed:
Get-Module -Name AzureRM -ListAvailable
[!IMPORTANT] If you have the AzureRM PowerShell module installed, see Az and AzureRM coexistence before proceeding.
- Install a supported version of PowerShell version 7 or higher
-
Update to Windows PowerShell 5.1
-
Install .NET Framework 4.7.2 or later
-
Update PowerShellGet
Launch Windows PowerShell 5.1 elevated as an administrator and run the following command to update PowerShellGet:
Install-Module -Name PowerShellGet -Force
-
Set the PowerShell execution policy to remote signed or less restrictive
-
Check the PowerShell execution policy:
Get-ExecutionPolicy -List
-
Set the PowerShell execution policy to remote signed:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
For more information about execution policies, see about_Execution_Policies.
-
Use the Install-Module cmdlet to install the Az PowerShell module:
Install-Module -Name Az -Repository PSGallery -Force
Use Update-Module to update to the latest version of the Az PowerShell module:
Update-Module -Name Az -Force
Updating the Az PowerShell module using Update-Module
doesn't remove old versions of the Az
PowerShell module from your system.
To remove the Az PowerShell module, see Uninstall the Azure PowerShell module.
::: zone-end
::: zone pivot="windows-msi"
This article explains how to install the Az PowerShell module 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.
Important
The MSI installation option can only be used to install the Az PowerShell module for use with Windows PowerShell 5.1.
-
Run the following command from PowerShell to determine your PowerShell version:
$PSVersionTable.PSVersion
-
Determine if you have the AzureRM PowerShell module installed
Get-Module -Name AzureRM -ListAvailable
[!IMPORTANT] If you have the AzureRM PowerShell module installed, see Az and AzureRM coexistence before proceeding.
-
Update to Windows PowerShell 5.1
-
Install .NET Framework 4.7.2 or later
-
Set the PowerShell script execution to remote signed or less restrictive
-
Check the PowerShell execution policy:
Get-ExecutionPolicy -List
-
Set the PowerShell execution policy to remote signed:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
For more information about execution policies, see about_Execution_Policies.
-
The MSI package for Azure PowerShell is available from GitHub:
- Visit github.com/Azure/azure-powershell/releases
- Locate the most recent Az PowerShell module. They are listed chronologically with no name. For example,
9.5.0
- Scroll down to the end of the patch notes and click the arrow next to "Assets" to reveal the MSI options.
- Click on the Az-Cmdlets MSI of your choice to start the download
The installer automatically removes older versions of the Az PowerShell module that were installed
using an MSI. The MSI package installs modules in "${env:ProgramFiles}\WindowsPowerShell\Modules"
::: zone-end
To start managing your Azure resources with the Az PowerShell module, launch a PowerShell session
and run Connect-AzAccount
to sign in to Azure:
Connect-AzAccount
Use your Azure account login credentials to log into the browser window that opens.
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 Azure PowerShell context objects.
For solutions to common installation issues with the Az PowerShell module, see Troubleshoot installation problems with the Az PowerShell module.
To file an issue about the Az PowerShell module, see: file an issue on GitHub
To provide feedback from within a PowerShell session, use the Send-Feedback cmdlet.
To learn more about managing your Azure resources with the Az PowerShell module, see Get Started with Azure PowerShell.