Install Azure PowerShell
Table of Contents
Overview
Azure PowerShell is a set of modules that provide cmdlets to manage Azure resources directly from the PowerShell command line. The recommended way to install Azure PowerShell is using PowerShellGet, which ensures you receive updates automatically.
Prerequisites
- Windows 10, macOS, or Linux
- PowerShell 7.x or later (Windows PowerShell 5.1 also works)
- An active Azure subscription
Install via PowerShellGet
Open an elevated PowerShell session and run the following commands:
Install-Module -Name Az -Repository PSGallery -ForceAfter installation, import the module:
Import-Module AzTo keep the module up‑to‑date:
Update-Module -Name AzInstall via MSI Installer (Windows only)
Download the latest MSI package from the official releases page and run the installer.
Download MSIAfter installation, open PowerShell and verify the module is available:
Get-Module -ListAvailable -Name AzVerify the Installation
Run the following command to sign in to Azure:
Connect-AzAccountIf the sign‑in dialog appears and you can list subscriptions, the installation succeeded:
Get-AzSubscriptionUninstall Azure PowerShell
To remove the Az module:
Uninstall-Module -Name Az -AllVersions -ForceIf you installed via MSI, use "Add or Remove Programs" in Windows Settings.