hands-on lab

Deploying a Windows Azure VM using Azure CLI

Up to 1h
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.


Azure CLI is the command-line interface provided by the Azure team with a set of commands used to create and manage Azure resources. While working with Azure CLI, you will get hands-on experience with different types of actions to manage the resources.

Azure Virtual Machines (VMs) offers an IaaS offering with on-demand, scalable computing resources. VMs offer a quick and easy way to create a computer with a specific configuration required for any purpose such as developing or testing an application while giving you the ability to decommission them when not needed to save costs.

In this lab, you will create an Azure VM using Azure CLI and interact with the resource programmatically using a terminal.

Learning Objectives

Upon completion of this lab, you will be able to:

  • Understand Azure VM CLI commands
  • Create a Windows Virtual Machine using Azure CLI
  • Use CLI Modules to interact with Azure VM resource

Intended Audience

  • Candidates for Azure Administrator Certification
  • Cloud Engineers
  • Cloud Architects
  • DevOps Engineers


Familiarity with the following will be beneficial but is not required:

  • Azure Compute concepts

The following and labs can be used to fulfill the prerequisite:


May 2nd, 2023 - Updated theia to include autosave

Environment before

Environment after

About the author

Learning paths

Parveen is an Azure advocate with previous experience in the professional consulting services industries. He specializes in infrastructure and DevOps with a wide range of knowledge in security and access management. He is also an Azure Certified - DevOps Engineer Expert, Security Engineer, Developer Associate, Administrator Associate, CompTIA Certified - Network+, Security+, and AWS Cloud Practitioner.
Parveen enjoys writing about cloud technologies and sharing the knowledge with the community to help students upskill in the cloud.

Covered topics

Lab steps

Logging into Azure using Azure CLI
Exploring Azure CLI Commands for Virtual Machines
Creating Azure VM using Azure CLI
Interacting with VM using Azure CLI