This document provides instructions for installing Azure PowerShell on various platforms. Azure PowerShell is a set of cmdlets that you can use to manage your Azure subscription directly from the command line.
Before you begin, ensure you have the following:
You can install Azure PowerShell using one of the following methods:
This is the recommended method for installing the latest version of the Az module.
To install the Az module on Windows, open a PowerShell session as an administrator and run the following commands:
Install-Module -Name Az -AllowClobber -Scope CurrentUserIf you want to install for all users, run the command without the -Scope CurrentUser parameter (requires administrator privileges).
For detailed instructions and troubleshooting, refer to the official PowerShellGet installation guide.
On macOS and Linux, you can use PowerShell Core. Open your terminal and run:
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -ForceFor detailed instructions and troubleshooting, refer to the official PowerShell Core installation guide.
You can also install Azure PowerShell from the Microsoft Store. This method automatically handles updates.
Search for "Azure PowerShell" in the Microsoft Store app or visit the Microsoft Store page.
After installation, verify that Azure PowerShell is installed correctly by opening a new PowerShell session and running:
Get-InstalledModule -Name AzYou should see information about the installed Az module, including its version.
To connect to your Azure account, use the Connect-AzAccount cmdlet:
Connect-AzAccountThis will open a browser window or prompt for credentials to authenticate with Azure.