This Azure CLI article discussed the syntax and usage of the Az VM create command with certain examples of how to use this command.
Table of Contents
Az VM create
You can use the az vm create command to create an Azure Virtual machine using Azure CLI quickly.
Syntax
The syntax is as below
az vm create --resource-group Resource Group Name --name VM Name --image Win2016Datacenter --admin-username User Name --admin-password "Your Password" --location Location NameExample
Consider the below example
az vm create --resource-group Demo789 --name APPLEVM --image Win2016Datacenter --admin-username rajkishore --admin-password "Password@123" --location eastusIn the above example.
- Demo789 — The name of the Resource Group.
- APPLEVM— Virtual machine name.
- Win2016Datacenter — Image name.
- rajkishore–The local admin username for the VM.
- Password@123 –The local admin password for the Virtual Machine.
- eastus — The location name.
After executing the above command, I got the expected output as below and the Virtual Machine has been created successfully.
{
"fqdns": "",
"id": "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/Demo789/providers/Microsoft.Compute/virtualMachines/APPLEVM",
"location": "eastus",
"macAddress": "7C-1E-52-15-D4-42",
"powerState": "VM running",
"privateIpAddress": "10.0.0.4",
"publicIpAddress": "137.117.73.79",
"resourceGroup": "Demo789",
"zones": ""
}You can check out the same output in the below screenshot.

Az VM create Command – Video Tutorial
You may also like the following articles below
Conclusion
This article discussed the syntax and usage of the az vm create command, which allows you to quickly create an Azure Virtual machine using Azure CLI.

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
