Learn / AZ-104

12 free AZ-104 hands-on labs (with scripts and costs)

Reading about Azure is not the same as running it. These 12 labs and a capstone are free on GitHub. Each one is a real work ticket with scripts that build it, check it and delete it.

What makes these labs different

  • Written as tickets. Each lab is a task a junior Azure administrator gets in the first months on the job, not a click-along demo.
  • Three scripts per lab. deploy.sh builds it, verify.sh prints PASS or FAIL for each check, and cleanup.sh deletes everything it made.
  • Tested live. All 12 labs and the capstone were run end to end in a real Azure subscription in November 2026.
  • Built to keep costs tiny. Every lab lives in one resource group, and a setup script adds a US$20 monthly budget alert before you start.

The labs

Costs are rough US dollar estimates if you delete the lab the same day. Prices change, so keep the budget alert on.

#TicketExam areaRough cost
01Onboard a new hire: user, group, Reader role at resource group scopeIdentity, RBACFree
02Enforce a CostCenter tag with Azure Policy and protect the group with a lockGovernanceFree
03Share files with a partner using a revocable SAS and lifecycle rulesStorage accessunder $0.05
04Team file share with snapshots and soft delete, restore a deleted fileAzure Filesunder $0.05
05Deploy a VM from Bicep, change the template, preview with what-ifARM, Bicep, VMs$0.01 to $0.10 an hour
06Resize a VM and add a data diskVM sizes, disks$0.02 to $0.15 an hour
07Zero-downtime release with an App Service deployment slot swapApp Serviceabout $0.10 an hour
08Run an image from Azure Container Registry on ACI and Container AppsContainersunder $0.20
09Hub-spoke peering, an NSG, and prove traffic with Network WatcherNetworking$0.02 to $0.20 an hour
10Lock a storage account to a private endpoint with private DNSSecure access$0.03 to $0.12 an hour
11Send logs to Log Analytics, query with KQL, alert by emailMonitoringunder $0.05
12Back up a VM with a custom policy and restore its disksBackup$0.02 to $0.15 an hour
CapstoneA mini landing zone for a small companyAll domainsabout $0.15 an hour

How to run a lab

The easiest place is Azure Cloud Shell (bash) in the Azure portal: it is already signed in and has the Azure CLI. Use a subscription you are allowed to break, never your employer's production one.

git clone https://github.com/azureawscert-a11y/az104-field-labs.git
cd az104-field-labs
chmod +x labs/*/*.sh capstone/*.sh tools/*.sh

EMAIL=you@example.com bash tools/setup-subscription.sh  # once: providers + budget alert
bash tools/check-region.sh                              # once: finds a region and VM size you can use

cd labs/03-storage-sas-lifecycle
cat README.md                                           # read the ticket first
./deploy.sh                                             # build it
./verify.sh                                             # PASS / FAIL: explain the result
./cleanup.sh                                            # delete it the same day

Then do the part that teaches you the most: read deploy.sh, delete the lab, and rebuild it by typing the commands yourself.

Blocked by “SkuNotAvailable” or “QuotaExceeded”? New subscriptions are often blocked from small VM sizes in busy regions. In our own test on a new Pay-As-You-Go subscription, Canada Central allowed none of the lab VM sizes, while Canada East, East US and West US 2 did. check-region.sh finds a region that works for you without creating anything.

Do the labs count for the exam?

AZ-104 questions are written for people who have done the work: which command, which setting, what happens next. Doing each task once by script and once by hand is the fastest way to make that stick. The labs also give you something real to talk about in an interview: what you built, what broke, and how you fixed it.

New to the Azure CLI? Start with how to read any Azure CLI command. The labs are free in the az104-field-labs repo, with or without the book.

From the book

AZ-104: The Azure Administrator Field Guide

264 pages: every command in Azure CLI and PowerShell, 12 workplace labs and a capstone, 156 original practice questions and a job chapter.