MSDN Documentation

Microsoft Developer Network

Azure PowerShell Cmdlets

This document provides an overview and detailed descriptions of the Azure PowerShell cmdlets available for managing your Azure resources. Azure PowerShell is a set of modules that provide commands for managing Azure resources from the command line.

Getting Started

To start using Azure PowerShell cmdlets, you need to install the Azure PowerShell module. You can do this using PowerShellGet:

Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force

After installation, connect to your Azure account:

Connect-AzAccount

Common Cmdlet Categories

Azure PowerShell cmdlets are organized into modules, each typically corresponding to a specific Azure service. Here are some common categories:

Example Usage

Here's an example of how to list all virtual machines in a specific resource group:

Get-AzVM -ResourceGroupName "MyResourceGroup"

And to create a new storage account:

New-AzStorageAccount -ResourceGroupName "MyResourceGroup" -Name "mystorageaccount" -Location "East US" -SkuName "Standard_LRS"

Finding Cmdlets

You can use the Get-Command cmdlet to find available cmdlets. For example, to find all cmdlets related to virtual machines:

Get-Command -Module Az.Compute -Noun VM

For more detailed information on a specific cmdlet, use the Get-Help cmdlet:

Get-Help Get-AzVM -Full

Further Resources