Create Azure virtual machines - CLI and PowerShell
Azure CLI for quickly creating a virtual machine
az vm create --resource-group azuredemo --name demovm --image win2016datacenter --admin-username demousr --admin-password AzurePortal@123
PowerShell command for quickly creating a virtual machine
New-AzVm -ResourceGroupName azuredemo -Name backupvm -Location CentralUS -Image win2016datacenter -Credential (Get-Credential)