Azure PowerShell provides cmdlets for developers and administrators to develop, deploy, administer, and manage Azure resources from a PowerShell session.
Overview
Azure PowerShell is a collection of PowerShell cmdlets aimed at developers and administrators who work with Microsoft Azure. You install the rollup Az module from the PowerShell Gallery and use it to connect to Azure, manage subscriptions and tenants, and operate Azure services from the command line.
The Az module is the supported line and replaces the older AzureRM module; Microsoft advises not to install Az side by side with AzureRM. Rollup packages include Az for stable modules and AzPreview when you need preview functionality. Individual service modules are organized under the broader Az family.
Typical workflows start with Connect-AzAccount to sign in, optionally choosing a national cloud through the Environment parameter. Session context carries login state across modules and shells; Get-AzContext shows the active tenant and subscription, Get-AzSubscription lists subscriptions, and Set-AzContext switches the active subscription. Get-Command and Get-Help help you discover and learn cmdlets.
The Az module is preinstalled in Azure Cloud Shell, so you can use the same cmdlets in the browser-hosted shell. PowerShell 7 on Windows, Linux, and macOS is the recommended runtime, with Windows PowerShell 5.1 also supported when .NET Framework 4.7.2 or higher is present. Telemetry collection is on by default and can be turned off with Disable-AzDataCollection.
Key features
- Az rollup module for Azure services
- Connect-AzAccount cloud login
- Subscription and tenant context management
- PowerShell Gallery installation
- Preinstalled in Azure Cloud Shell
- Cmdlet discovery via Get-Command
- Replaces legacy AzureRM module
- Optional telemetry disable cmdlet
Use cases
- Automating Azure resource administration
- Scripted deployment and configuration
- Managing subscriptions from the shell
- Day-to-day operations in Cloud Shell
- Discovering Azure service cmdlets