Azure Tips — Use Azure CLI and PowerShell to quickly create a Virtual Machine on Azure Cloud
In addition to the Azure portal, you can also use Azure CLI and PowerShell to create a Virtual Machine on Azure.
You can open the Cloud Shell terminal by clicking the “Cloud Shell” button at the right-top corner of the Azure portal.
Here, you can switch to PowerShell from Bash in Cloud Shell by selecting the PowerShell option in the drop-down menu.
Then, let’s use the az vm
Azure CLI command to create a virtual machine first.
az vm create --resource-group azuretips-rg-002 --name vmazuretips001 --image win2019datacenter --admin-username azuretips --admin-password AzureTips@001
As you can see above, in this case, you need to provide the following parameters:
- resource-group
- name of the vm
- image
- admin-username
- admin-password
It is worth noting that when creating a VM in this way, the region where the VM is located will be the region where the resource group you identified in…