Cloud Shell, Azure CLI and Azure PowerShell

Azure portal · dashboard health $ az vm create --name web01 failed… replacing ✓ auto-healed Fixes itself
Type a command once and let the robot repeat it perfectly, from any browser with Cloud Shell.

😟 THE PROBLEM

Engineers click through the same setup again and again, making mistakes.

😊 THE SOLUTION

Script it with Azure CLI or PowerShell, run in Cloud Shell.

  • Hundreds of repetitive clicks✓ One script
  • Tools not installed on this PC✓ Cloud Shell in the browser
  • Human mistakes✓ Same result every time
🛠️ Solved with: Azure CLI · PowerShell · Cloud Shell
Try it yourself in the Azure simulator No Azure account needed. Cloud Shell: deploy a web app ⌨️ Try it ❯
Module 3: Management & Governance ⏱ 6 min read Updated 11 Nov 2026

Quick answer

Azure CLI (az commands) and Azure PowerShell (cmdlets such as New-AzVM) are command-line tools for managing Azure through scripts. Azure Cloud Shell is a browser-based shell, launched from the portal, that already has both tools installed and is already signed in. You can choose a Bash or PowerShell experience.

Exam objective: 3.3.2 Describe Azure Cloud Shell, Azure CLI, and Azure PowerShell. (Skills measured as of July 20, 2026)

Start with a question

You need to create the same 20 resources in three environments. Click 60 times, or run one script?

One script. That’s why Azure gives you the CLI, PowerShell and Cloud Shell.

Explain it like I’m 10

The technical explanation

The same task in both tools:

# Azure CLI
az group create --name rg-learn --location westeurope
# Azure PowerShell
New-AzResourceGroup -Name rg-learn -Location westeurope

Real-world business scenario

Enterprise

A managed service provider

The problem
Engineers created the same baseline resources for each new customer by hand, with frequent mistakes.
What they used
An Azure CLI script run from Cloud Shell or a pipeline.
Why that choice
Consistent, fast and repeatable.
The result
New customer environments are ready in minutes without errors.

When to use it and when not to

✓ Use it when…

  • Automation, bulk changes and repeatable tasks.
  • Cloud Shell when you are on any computer with only a browser.

✕ Think twice when…

  • Ad-hoc scripts for complex production infrastructure. Prefer IaC templates.
Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

Interview preparation

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What is Azure Cloud Shell?

Model answer

A command line in my browser, opened from the Azure portal, that already has Azure CLI and PowerShell installed and is signed in to my account. Nothing to install.

Intermediate Azure CLI or Azure PowerShell, which should you use?

Model answer

Both can do the same things. Pick the one that fits your skills and environment: the CLI's az commands feel natural in Bash and Linux; PowerShell cmdlets suit teams already using PowerShell on Windows. Both run on Windows, macOS and Linux.

Experienced developer Why use the command line instead of the portal?

Model answer

Repeatability and automation. Scripts can be version-controlled, reviewed, scheduled and run in pipelines, and they produce the same result every time. They are also faster for bulk operations.

Test yourself with exercises

3 original practice questions in the AZ-900 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

Question 1

Question 1 of 3

Which tool runs in the browser and already has Azure CLI and Azure PowerShell installed and authenticated?

Question 2

Question 2 of 3

Commands such as az vm create belong to which tool?

Question 3

Question 3 of 3

Which experiences can you choose in Azure Cloud Shell?

Quick revision

Key points

  • Azure CLI = az commands.
  • Azure PowerShell = cmdlets like New-AzVM.
  • Cloud Shell = browser shell with both tools, already authenticated.
  • Cloud Shell offers Bash or PowerShell.

Important terminology

Azure CLI
Cross-platform command-line tool using az commands, popular with Bash users.
Azure PowerShell
A set of PowerShell cmdlets (the Az module) for managing Azure.
Azure Cloud Shell
A browser-based, authenticated shell with Azure CLI and PowerShell preinstalled.

Common mistakes

  • Thinking you must install anything to use Cloud Shell.

Exam tips

  • "Browser-based shell with Azure tools preinstalled" = Azure Cloud Shell.

Five quick revision questions

  1. 1.What prefix do Azure CLI commands use?Show

    az

  2. 2.Give an Azure PowerShell cmdlet example.Show

    New-AzVM (or Get-AzResourceGroup).

  3. 3.Do you need to install anything for Cloud Shell?Show

    No, it runs in the browser.

  4. 4.Which shells does Cloud Shell offer?Show

    Bash and PowerShell.

  5. 5.Why prefer scripts over clicking for repeated tasks?Show

    They are repeatable, automatable and reviewable.

Official references

Make it stick: play a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

Finished this lesson? Tick it off. Your progress is saved in this browser.

Next up: Azure Arc