Environment
Azure
Requisites
Azure CLI 2.0
Code:
#!/bin/bash
# Admin Passwd Here
AdminPassword=PutPasswdHere
# Create a resource group.
azgroup
create --name
myResourceGroup
--locationeastus
# Create a virtual machine.
azvm
create
\
--resource-group
myResourceGroup \
--name
my2K16VM \
--image
win2016datacenter \
--admin-username
azureuser \
--admin-password
$AdminPassword
\
--no-wait