DEV Community

Sherdil IT Academy
Sherdil IT Academy

Posted on Originally published at academy.sherdil.org

6 Weeks of Hands-On Azure CLI Labs to Pass the AZ-104

The AZ-104 is a performance-based exam. You are clicking through the actual Azure portal and typing real commands under a timer, not answering multiple choice about what a resource group is. Which makes it strange how much AZ-104 prep still consists of watching four-hour video courses and taking notes. Notes do not build the muscle memory the exam is actually testing.

So here is the plan I would run instead: 6 weeks, entirely hands-on, built around the free-tier Azure sandbox and the Azure CLI, mapped directly to the exam's own skill domains.

Before week 1: set up the sandbox

Use a free Azure account or the Microsoft Learn sandbox, not a shared work subscription. You need permission to break things.

az login
az account set --subscription "<your-sub-id>"
az group create --name az104-lab --location eastus
Enter fullscreen mode Exit fullscreen mode

Every week below assumes you are working inside this one resource group, and tearing pieces of it down as you go, which is itself part of the exam's skill set.

Weeks 1-2: Identity and governance

This domain is roughly 20% of the exam and the one people skip in video courses because it feels administrative. It is not administrative on exam day.

# Create a user and assign a role at resource-group scope
az ad user create --display-name "Lab User" --user-principal-name labuser@yourtenant.onmicrosoft.com --password "TempPass123!"
az role assignment create --assignee labuser@yourtenant.onmicrosoft.com --role "Contributor" --resource-group az104-lab

# Apply a resource lock so you cannot accidentally delete the group mid-lab
az lock create --name dont-delete --resource-group az104-lab --lock-type CanNotDelete
Enter fullscreen mode Exit fullscreen mode

By the end of week 2, you should be able to explain the difference between a role assignment at subscription, resource-group, and resource scope without looking it up.

Weeks 3-4: Storage, compute, and networking

The largest single chunk of the exam, and the one that rewards raw repetition.

# Storage: create an account and a container, then lock down public access
az storage account create --name az104labstorage --resource-group az104-lab --sku Standard_LRS
az storage container create --name lab-container --account-name az104labstorage --public-access off

# Compute: spin up a VM and immediately resize it
az vm create --resource-group az104-lab --name lab-vm --image Ubuntu2204 --generate-ssh-keys
az vm resize --resource-group az104-lab --name lab-vm --size Standard_B2s

# Networking: create a VNet and a subnet, then check effective routes
az network vnet create --resource-group az104-lab --name lab-vnet --subnet-name lab-subnet
az network nic show-effective-route-table --resource-group az104-lab --name lab-vmVMNic
Enter fullscreen mode Exit fullscreen mode

Do each of these commands at least three times across the two weeks, changing one parameter each time. The exam rewards fluency, not familiarity.

Weeks 5-6: Monitoring and troubleshooting

The domain most people under-prepare for, because it is the hardest to fake with flashcards.

# Enable diagnostic logging and query it back
az monitor diagnostic-settings create --name lab-diag --resource /subscriptions/<sub-id>/resourceGroups/az104-lab/providers/Microsoft.Compute/virtualMachines/lab-vm --logs '[{"category": "Administrative","enabled": true}]' --storage-account az104labstorage

# Simulate a failure and practice reading it
az vm stop --resource-group az104-lab --name lab-vm
az vm get-instance-view --resource-group az104-lab --name lab-vm --query instanceView.statuses
Enter fullscreen mode Exit fullscreen mode

Deliberately break something in your own sandbox during week 6, a wrong NSG rule, a stopped VM a dependent service expects to be running, and practice diagnosing it from the CLI output alone. That is a closer simulation of exam pressure than any video course gets you.

Tear it all down

az group delete --name az104-lab --yes --no-wait
Enter fullscreen mode Exit fullscreen mode

Do this at the end of every week, not just at the end of the plan. Rebuilding the resource group from scratch each time is itself repetition, and it keeps you from accumulating a messy sandbox that no longer reflects a clean exam-day state.

What this does not replace

A lab plan gets you fluent with the tooling. It does not replace working through the official exam skills outline line by line, or sitting a few timed practice exams in the final week to get used to the two-hour pace. Treat this as the hands-on 80%, not the whole 100%.


I put the complete picture in one place: the current 2026 exam fee in PKR, what a realistic study timeline actually looks like around a full-time job, and the free resources worth using before you pay for anything, over here: Azure AZ-104 Exam Cost & Preparation Guide for Pakistani Professionals.

Once you pass, what does the AZ-104 actually add to your paycheck as an Azure Administrator in Pakistan? Worth knowing before you commit six weeks to this.

Which domain above is the one you'd need to lab the hardest? Drop it in the comments. 👇

Top comments (0)