Want to go from Azure theory to hands-on cloud confidence? This post gives you 100 Azure practice problems with clear, step-by-step solutions. You’ll work through virtual machines, storage, networking, functions, and more. Each problem is explained simply — try it yourself, then check the answer. Perfect for beginners and certification prep. Pick a challenge and start mastering Azure today.
Try it: 100 .NET practice problems with solutions
1. Create a resource group named “RG-Test” in the East US region using Azure CLI.
bash
az group create --name RG-Test --location eastus
2. Deploy a Windows Server 2019 Datacenter VM named “WinVM” in the resource group “RG-Test” using Azure CLI.
bash
az vm create --resource-group RG-Test --name WinVM --image Win2019Datacenter --admin-username azureuser --admin-password YourPassword123!
3. List all virtual machines in a resource group using PowerShell.
powershell
Get-AzVM -ResourceGroupName RG-Test
4. Create an Azure Storage Account named “mystorageaccount123” (globally unique) with LRS replication.
bash
az storage account create --name mystorageaccount123 --resource-group RG-Test --location eastus --sku Standard_LRS
5. Create a blob container named “mycontainer” in the storage account “mystorageaccount123”.
bash
az storage container create --name mycontainer --account-name mystorageaccount123 --auth-mode login
6. Upload a local file “data.txt” to the blob container “mycontainer”.
bash
az storage blob upload --account-name mystorageaccount123 --container-name mycontainer --name data.txt --file data.txt --auth-mode login
7. Generate a shared access signature (SAS) token for a blob with read permission for 1 hour.
bash
az storage blob generate-sas --account-name mystorageaccount123 --container-name mycontainer --name data.txt --permissions r --expiry $(date -u -d '1 hour' '+%Y-%m-%dT%H:%M:%SZ') --auth-mode login
8. Create an Azure Virtual Network (VNet) named “vnet1” with address space 10.0.0.0/16.
bash
az network vnet create --resource-group RG-Test --name vnet1 --address-prefix 10.0.0.0/16
9. Add a subnet named “subnet1” with address prefix 10.0.1.0/24 to the VNet “vnet1”.
bash
az network vnet subnet create --resource-group RG-Test --vnet-name vnet1 --name subnet1 --address-prefix 10.0.1.0/24
10. Create a Network Security Group (NSG) named “nsg-web” and add an inbound rule allowing HTTP (port 80).
bash
az network nsg create --resource-group RG-Test --name nsg-web az network nsg rule create --resource-group RG-Test --nsg-name nsg-web --name AllowHTTP --protocol tcp --priority 1000 --destination-port-range 80 --access Allow
11. Associate the NSG “nsg-web” with the subnet “subnet1”.
bash
az network vnet subnet update --resource-group RG-Test --vnet-name vnet1 --name subnet1 --network-security-group nsg-web
12. Create a public IP address named “myPublicIP” in the resource group.
bash
az network public-ip create --resource-group RG-Test --name myPublicIP --sku Standard
Try it: 100 Python practice problems with solutions
13. Create a network interface (NIC) named “myNIC” and associate it with the public IP and subnet.
bash
az network nic create --resource-group RG-Test --name myNIC --vnet-name vnet1 --subnet subnet1 --public-ip-address myPublicIP
14. Create a Linux VM (Ubuntu 20.04) named “LinuxVM” using the NIC created above.
bash
az vm create --resource-group RG-Test --name LinuxVM --nics myNIC --image UbuntuLTS --admin-username azureuser --admin-password YourPassword123!
15. Use Azure CLI to stop and deallocate the VM “LinuxVM”.
bash
az vm deallocate --resource-group RG-Test --name LinuxVM
16. Start the VM “LinuxVM” again.
bash
az vm start --resource-group RG-Test --name LinuxVM
17. Restart the VM “WinVM”.
bash
az vm restart --resource-group RG-Test --name WinVM
18. Resize the VM “WinVM” to Standard_DS2_v2.
bash
az vm resize --resource-group RG-Test --name WinVM --size Standard_DS2_v2
19. Create an Azure SQL Database logical server named “sqlserver1234” (globally unique) with admin login “sqladmin”.
bash
az sql server create --name sqlserver1234 --resource-group RG-Test --location eastus --admin-user sqladmin --admin-password YourPassword123!
20. Create a firewall rule to allow your current public IP to access the SQL server.
bash
az sql server firewall-rule create --resource-group RG-Test --server sqlserver1234 --name AllowMyIP --start-ip-address $(curl -s ifconfig.me) --end-ip-address $(curl -s ifconfig.me)
21. Create a database named “SalesDB” with S0 performance tier.
bash
az sql db create --resource-group RG-Test --server sqlserver1234 --name SalesDB --edition Standard --service-objective S0
22. Query the database using a T‑SQL command from Azure CLI (show version).
bash
az sql db show-connection-string --server sqlserver1234 --name SalesDB --client ado.net
23. Create an Azure App Service plan named “myAppPlan” in the Free tier.
bash
az appservice plan create --resource-group RG-Test --name myAppPlan --sku FREE
24. Create a web app named “mywebapp123456” (globally unique) using the App Service plan.
bash
az webapp create --resource-group RG-Test --name mywebapp123456 --plan myAppPlan --runtime "NODE:14-lts"
25. Deploy a sample code from a public GitHub repository to the web app.
bash
az webapp deployment source config --resource-group RG-Test --name mywebapp123456 --repo-url https://github.com/Azure-Samples/nodejs-docs-hello-world --branch master --manual-integration
26. Enable application logging for the web app (file system).
bash
az webapp log config --resource-group RG-Test --name mywebapp123456 --application-logging filesystem
27. Create a storage account for diagnostics logs.
bash
az storage account create --name diagstore12345 --resource-group RG-Test --location eastus --sku Standard_LRS
28. Configure Azure Monitor diagnostic settings to send VM metrics to Log Analytics workspace.
bash
az deployment group create --resource-group RG-Test --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-monitor-action-log-alert/azuredeploy.json
29. Create a Log Analytics workspace named “LogAnalyticsWorkspace”.
bash
az monitor log-analytics workspace create --resource-group RG-Test --workspace-name LogAnalyticsWorkspace --location eastus
30. Query the Log Analytics workspace for events (sample: Heartbeat).
bash
az monitor log-analytics query --workspace LogAnalyticsWorkspace --analytics-query "Heartbeat | take 10"
31. Create an Azure Kubernetes Service (AKS) cluster named “myAKSCluster” with one node.
bash
az aks create --resource-group RG-Test --name myAKSCluster --node-count 1 --enable-addons monitoring --generate-ssh-keys
32. Get credentials for the AKS cluster.
bash
az aks get-credentials --resource-group RG-Test --name myAKSCluster
33. List all pods in the AKS cluster.
bash
kubectl get pods --all-namespaces
34. Scale the AKS cluster to 3 nodes.
bash
az aks scale --resource-group RG-Test --name myAKSCluster --node-count 3
35. Delete the AKS cluster.
bash
az aks delete --resource-group RG-Test --name myAKSCluster --yes
36. Create an Azure Function App (Consumption plan) named “funcapp12345”.
bash
az functionapp create --resource-group RG-Test --name funcapp12345 --storage-account mystorageaccount123 --consumption-plan-location eastus --runtime node --runtime-version 14
37. Add a new function to the Function App using a local Git repository.
bash
az functionapp deployment source config --resource-group RG-Test --name funcapp12345 --repo-url https://github.com/your-repo --branch main
38. Create an Event Hubs namespace named “eventhubns123”.
bash
az eventhubs namespace create --resource-group RG-Test --name eventhubns123 --location eastus --sku Standard
39. Create an Event Hub named “myhub” inside the namespace.
bash
az eventhubs eventhub create --resource-group RG-Test --namespace-name eventhubns123 --name myhub
40. Send a test event to the event hub using CLI (requires connection string).
bash
az eventhubs eventhub generate-sas --resource-group RG-Test --namespace-name eventhubns123 --name myhub --duration 3600
41. Create a Service Bus namespace (Standard tier) named “sbnamespace123”.
bash
az servicebus namespace create --resource-group RG-Test --name sbnamespace123 --location eastus --sku Standard
42. Create a Service Bus queue named “myqueue”.
bash
az servicebus queue create --resource-group RG-Test --namespace-name sbnamespace123 --name myqueue
43. Send a message to the Service Bus queue using Azure CLI.
bash
az servicebus message send --resource-group RG-Test --namespace-name sbnamespace123 --queue-name myqueue --message-content "Hello"
44. Receive a message from the Service Bus queue.
bash
az servicebus message receive --resource-group RG-Test --namespace-name sbnamespace123 --queue-name myqueue
45. Create an Azure Cosmos DB account (SQL API) named “cosmosdb1234”.
bash
az cosmosdb create --name cosmosdb1234 --resource-group RG-Test --kind GlobalDocumentDB
46. Create a database and container in Cosmos DB (throughput 400 RU/s).
bash
az cosmosdb sql database create --account-name cosmosdb1234 --resource-group RG-Test --name mydb az cosmosdb sql container create --account-name cosmosdb1234 --resource-group RG-Test --database-name mydb --name mycontainer --partition-key-path "/id" --throughput 400
47. List the Cosmos DB connection strings.
bash
az cosmosdb keys list --name cosmosdb1234 --resource-group RG-Test --type connection-strings
48. Create a CDN profile named “mycdnprofile” with Standard Akamai pricing tier.
bash
az cdn profile create --resource-group RG-Test --name mycdnprofile --sku Standard_Akamai
49. Create a CDN endpoint that points to the web app “mywebapp123456.azurewebsites.net“.
bash
az cdn endpoint create --resource-group RG-Test --profile-name mycdnprofile --name mycdnendpoint --origin mywebapp123456.azurewebsites.net --origin-host-header mywebapp123456.azurewebsites.net
50. Purge the CDN endpoint cache.
bash
az cdn endpoint purge --resource-group RG-Test --profile-name mycdnprofile --name mycdnendpoint --content-paths "/*"
51. Create an Azure Key Vault named “mykeyvault987” (globally unique).
bash
az keyvault create --name mykeyvault987 --resource-group RG-Test --location eastus
52. Store a secret “apiKey” with value “abc123” in the Key Vault.
bash
az keyvault secret set --vault-name mykeyvault987 --name apiKey --value abc123
53. Retrieve the secret value.
bash
az keyvault secret show --vault-name mykeyvault987 --name apiKey --query value -o tsv
54. Grant a VM managed identity access to read secrets from Key Vault.
bash
az vm identity assign --resource-group RG-Test --name LinuxVM az keyvault set-policy --name mykeyvault987 --object-id <principal-id> --secret-permissions get
55. Create a user-assigned managed identity named “myUserIdentity”.
bash
az identity create --resource-group RG-Test --name myUserIdentity
56. Create an Azure Container Registry (ACR) named “myacr123”.
bash
az acr create --resource-group RG-Test --name myacr123 --sku Basic --admin-enabled true
57. Log in to the ACR.
bash
az acr login --name myacr123
58. Build a Docker image from a local Dockerfile and push to ACR.
bash
az acr build --registry myacr123 --image myapp:latest .
59. List repositories in the ACR.
bash
az acr repository list --name myacr123 --output table
60. Create an Azure DevOps project (using CLI).
bash
az devops project create --name "MyProject" --organization "https://dev.azure.com/yourorg"
61. Create a pipeline in Azure DevOps using YAML (create a file in repo).
yaml
# .azuredevops/pipeline.yml trigger: - main pool: vmImage: ubuntu-latest steps: - script: echo "Hello World"
62. Use Azure CLI to create a VM from a custom image stored in a shared image gallery.
bash
az sig image-version list --resource-group RG-Test --gallery-name myGallery --gallery-image-definition myImage --query "[0].id" -o tsv az vm create --resource-group RG-Test --name VMFromImage --image <image-version-id>
Try it: 100 Javascript practice problems with solutions
63. Create an Azure Bastion host to securely connect to VMs without public IP.
bash
az network bastion create --resource-group RG-Test --name myBastion --vnet-name vnet1 --public-ip-address myPublicIP
64. Connect to a VM using Azure Bastion (from Azure portal).
bash
# This is a portal operation; no direct CLI command. Alternative: use Azure CLI to generate connection URL?
65. Create an Application Gateway with WAF (Web Application Firewall) tier.
bash
az network application-gateway create --resource-group RG-Test --name myAppGateway --sku WAF_v2 --capacity 1 --vnet-name vnet1 --subnet subnet1 --public-ip-address myPublicIP
66. Configure a load balancing rule on the Application Gateway to forward HTTP traffic to backend pool.
bash
az network application-gateway rule create --resource-group RG-Test --gateway-name myAppGateway --name httpRule --http-listener listener1 --backend-pool pool1 --backend-http-settings settings1
67. Create a Traffic Manager profile with Performance routing method.
bash
az network traffic-manager profile create --resource-group RG-Test --name myTrafficManager --routing-method Performance
68. Add an endpoint to the Traffic Manager profile pointing to the web app.
bash
az network traffic-manager endpoint create --resource-group RG-Test --profile-name myTrafficManager --name myEndpoint --type azureEndpoints --target-resource-id $(az webapp show --name mywebapp123456 --resource-group RG-Test --query id -o tsv)
69. Enable Azure Backup for a VM using Recovery Services vault.
bash
az backup vault create --resource-group RG-Test --name myRecoveryVault --location eastus az backup protection enable-for-vm --resource-group RG-Test --vault-name myRecoveryVault --vm $(az vm show --name LinuxVM --resource-group RG-Test --query id -o tsv) --policy-name DefaultPolicy
70. Perform an on-demand backup of a VM.
bash
az backup protection backup-now --resource-group RG-Test --vault-name myRecoveryVault --container-name $(az backup container list --resource-group RG-Test --vault-name myRecoveryVault --query [0].name -o tsv) --item-name LinuxVM --retain-until 31-12-2025
71. Restore a VM from a recovery point.
bash
az backup restore restore-azurefiles --resource-group RG-Test --vault-name myRecoveryVault --container-name <container> --item-name <item> --rp-name <recovery-point> --target-storage-account <storage-account>
72. Create an Azure ExpressRoute circuit (simulate with CLI request).
bash
az network express-route create --resource-group RG-Test --name myCircuit --bandwidth 50Mbps --peering-location "Silicon Valley" --service-provider-name "Equinix" --sku-family MeteredData --sku-tier Standard
73. List all regions that support Availability Zones.
bash
az account list-locations --query "[?zoneInfo.zoneTypes != null]" -o table
74. Deploy a simple ARM template to create a storage account.
json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageName": { "type": "string" }
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2021-09-01",
"name": "[parameters('storageName')]",
"location": "eastus",
"sku": { "name": "Standard_LRS" },
"kind": "StorageV2"
}
]
}
bash
az deployment group create --resource-group RG-Test --template-file template.json --parameters storageName=mystore123
75. Create a policy definition that prohibits public IPs on VMs.
bash
az policy definition create --name no-public-ips --rules '{"if": {"field": "Microsoft.Network/publicIPAddresses"}}'
76. Assign the policy to the subscription or resource group.
bash
az policy assignment create --name assignNoPublicIPs --policy no-public-ips --scope /subscriptions/<subscription-id>
77. Create a user with Contributor role on a resource group using Azure CLI.
bash
az role assignment create --assignee user@domain.com --role Contributor --scope /subscriptions/<sub-id>/resourceGroups/RG-Test
78. List all role assignments for a specific user.
bash
az role assignment list --assignee user@domain.com -o table
79. Create an Azure SQL Managed Instance (requires specific steps; simplified CLI).
bash
az sql mi create --resource-group RG-Test --name sqlmi-test --location eastus --subnet $(az network vnet subnet show --resource-group RG-Test --vnet-name vnet1 --name ManagedInstanceSubnet --query id -o tsv) --administrator-login sqladmin --administrator-login-password YourPassword123!
80. Configure failover group for two SQL databases.
bash
az sql failover-group create --resource-group RG-Test --server sqlserver1234 --name myFailoverGroup --partner-server sqlserver-secondary --failover-policy Automatic --grace-period 60
81. Create a Data Factory instance.
bash
az datafactory create --resource-group RG-Test --factory-name mydatafactory --location eastus
82. Create a pipeline in Data Factory using JSON definition.
bash
az datafactory pipeline create --resource-group RG-Test --factory-name mydatafactory --name mypipeline --pipeline '{"activities":[{"name":"Wait","type":"Wait","typeProperties":{"waitTimeInSeconds":1}}]}'
83. Run the Data Factory pipeline.
bash
az datafactory pipeline create-run --resource-group RG-Test --factory-name mydatafactory --name mypipeline
84. Create an Azure Cognitive Services account (Text Analytics).
bash
az cognitiveservices account create --name textanalyticsaccount --resource-group RG-Test --kind TextAnalytics --sku S0 --location eastus
85. Get the endpoint and key for the Cognitive Services account.
bash
az cognitiveservices account keys list --name textanalyticsaccount --resource-group RG-Test az cognitiveservices account show --name textanalyticsaccount --resource-group RG-Test --query properties.endpoint -o tsv
86. Create a Logic App (Consumption plan).
bash
az logic workflow create --resource-group RG-Test --name mylogicapp --location eastus --definition "{\"$schema\":\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#\",\"actions\":{},\"triggers\":{\"manual\":{\"kind\":\"Http\",\"type\":\"Request\"}}}"
87. Enable diagnostic settings for a Logic App to send logs to Log Analytics.
bash
az monitor diagnostic-settings create --resource $(az logic workflow show --name mylogicapp --resource-group RG-Test --query id -o tsv) --name diag --workspace $(az monitor log-analytics workspace show --resource-group RG-Test --workspace-name LogAnalyticsWorkspace --query id -o tsv) --logs '[{"category":"WorkflowRuntime","enabled":true}]'
88. Create an Azure Front Door profile with a custom domain.
bash
az afd profile create --resource-group RG-Test --name myFrontDoor --sku Premium
89. Add an endpoint to Front Door pointing to the web app.
bash
az afd endpoint create --resource-group RG-Test --profile-name myFrontDoor --endpoint-name myEndpoint --origin-host-header mywebapp123456.azurewebsites.net
90. Configure a custom domain with SSL certificate using Front Door.
bash
az afd custom-domain create --resource-group RG-Test --profile-name myFrontDoor --custom-domain-name mycustomdomain --hostname www.example.com --certificate-type ManagedCertificate
Try it: 100 Go (Golang) practice problems with solutions
91. Create an Azure Time Series Insights environment (Gen2).
bash
az tsi environment create --resource-group RG-Test --environment-name mytsi --location eastus --sku Gen2 --capacity 1 --time-series-id-properties name=id type=string
92. Create an Azure SignalR service.
bash
az signalr create --resource-group RG-Test --name mysignalr --sku Free_F1 --unit-count 1 --service-mode Default
93. Get the SignalR connection string.
bash
az signalr key list --resource-group RG-Test --name mysignalr
94. Create an Azure Database for PostgreSQL flexible server.
bash
az postgres flexible-server create --resource-group RG-Test --name mypgserver --location eastus --admin-user pgadmin --admin-password YourPassword123! --sku-name Standard_B1ms
95. Create a database in PostgreSQL flexible server.
bash
az postgres flexible-server db create --resource-group RG-Test --server-name mypgserver --database-name mydb
96. Allow Azure services to access the PostgreSQL server.
bash
az postgres flexible-server firewall-rule create --resource-group RG-Test --server-name mypgserver --name AllowAllAzureIPs --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255
97. Create an Azure Cache for Redis instance (Basic tier).
bash
az redis create --resource-group RG-Test --name myredis --location eastus --sku Basic --vm-size c0
98. Get the Redis connection details (host and key).
bash
az redis show --resource-group RG-Test --name myredis --query hostName -o tsv az redis list-keys --resource-group RG-Test --name myredis --query primaryKey -o tsv
99. Create an Azure Container Instance (ACI) running an nginx container.
bash
az container create --resource-group RG-Test --name mynginx --image nginx --dns-name-label mynginx-dns --ports 80
100. Delete the entire resource group and all resources inside it.
bash
az group delete --name RG-Test --yes --no-wait
Final Thought
And just like that, 100 Azure problems are now behind you — and my heart is full of gratitude. Thank you for showing up, for trusting this collection, and for giving your precious time and energy to grow your cloud skills. Every virtual machine you configured, every storage account you provisioned, every networking puzzle you solved — it all matters, and I’m genuinely thankful I could be a tiny part of your journey.
Learning Azure isn’t just about passing exams or landing jobs — it’s about opening doors, building possibilities, and becoming someone who can shape the future. And watching you take those steps fills me with so much appreciation. This post exists because learners like you deserve clear, caring guidance, and I’m grateful you chose to walk this path right here.
Bookmark this page as a friend you can always return to. And whenever you deploy something wonderful in the cloud, pause and remember — it started with a single problem, a little courage, and a whole lot of heart. Thank you, truly. Keep building, keep shining, and know that this community is always grateful for you.