Thursday, November 10, 2022

Create a basic Virtual Machine using Azure CLI

First, create a resource group

> az group create \
--name MyResourceGroup \
--location CentralUS \
--tags MyTag 

Then create the VM and provide the resource group created in the above step

> az vm create \
--name MyFirstVM \

--resource-group MyResourceGroup \

--image Win2016Datacenter \

--admin-username Hasitha \

--admin-password Password*1234 \

--size Standard_D2ads_v5 \

--public-ip-sku basic \

--os-disk-size-gb 128 


 

No comments:

Post a Comment