-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathCreating-VM
15 lines (10 loc) · 906 Bytes
/
Creating-VM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
############################################################################################################
az group create -l westus -n hub-RG
az network vnet create -g hub-RG --location eastus -n hubRG-Vnet1 --address-prefix 10.10.0.0/16 \
--subnet-name hubRG-subnet1 --subnet-prefix 10.10.1.0/24
az network nsg create -g hub-RG --location eastus -n hubRG-NSG
az network nsg rule create -g hub-RG --nsg-name hubRG-NSG -n hubRG-NSG_rule1 --priority 100 \
--source-address-prefixes '*' --source-port-ranges '*' --destination-address-prefixes '*' \
--destination-port-ranges '*' --access Allow --protocol Tcp --description "Allowing All Traffic for now"
az vm create --resource-group hub-RG --name WindowstestVM --image Win2019Datacenter --vnet-name hubRG-Vnet1 --subnet hubRG-subnet1 \
--admin-username cloudfreak --admin-password "Zoom@12345678" --size Standard_D4s_v3 --nsg hubRG-NSG -l eastus