Do the same jobs in Azure PowerShell

Azure Portal, Hands On10 minutesFreeSteps checked 23 October 2026By Cloud Hands On

In this task you'll manage Azure with Azure PowerShell.

Azure PowerShell is the other command-line way to manage Azure, alongside the Azure CLI. Its commands follow PowerShell's Verb-Noun style, such as Get-AzResourceGroup, and they return objects you can filter and sort.

Both tools do the same jobs, so use whichever your team knows. People who already manage Windows servers often prefer PowerShell. Cloud Shell has both ready to use.

Example. Larkfield Group's Windows administrators already script their servers in PowerShell, so they use the Az module for Azure too, and keep one script that lists every VM without an owner tag.

Before you start

You need: Reader to look; Contributor to create. Time: 10 minutes.

Where to look

  1. Cloud Shell
  2. Switch to PowerShell

Steps

  1. Open Cloud Shell, select Switch to PowerShell in its toolbar and Confirm. You're signed in already.
  2. List your resource groups:Type Get-AzResourceGroup | Select-Object ResourceGroupName, Location
  3. Create a practice group:Type New-AzResourceGroup -Name rg-ps-practice -Location uksouth -Tag @{env='practice'}
  4. Find every resource group with that tag:Type Get-AzResourceGroup -Tag @{env='practice'}
  5. Look up the help for any command:Type Get-Help New-AzResourceGroup -Examples
  6. Delete the group:Type Remove-AzResourceGroup -Name rg-ps-practice -Force. Then switch back to Bash if you prefer it.

Commands

# The same jobs in the Azure CLI, for comparison
az group list --query "[].{name:name, location:location}" --output table
az group create --name rg-ps-practice --location uksouth --tags env=practice
az group list --tag env=practice --output table
az group delete --name rg-ps-practice --yes

Watch out for

Cost
Running commands is free. An empty resource group costs nothing.
Security
-Force skips the "are you sure?" question, so double-check names before using it. Never save passwords in scripts.
Common mistakes
Mixing Azure CLI syntax (az group list) with PowerShell syntax. Forgetting that tag values are written as @{name='value'} in PowerShell.

Clean up

  1. Resource groups
  2. rg-ps-practice
  3. Delete resource group

Make sure rg-ps-practice is deleted, with Remove-AzResourceGroup or in the portal.

Words to know

Az module
The PowerShell module for Azure. Its commands all start with a verb and Az, such as Get-AzVM.
Cmdlet
A PowerShell command, named Verb-Noun.
Pipeline
The | symbol, which passes one command's results to the next.

Tick off each step and track your progress in the guide.

Open this task in Azure Portal, Hands On

Keep going