The steps for the recipe are as follows:
- Define key variables
$Locname = 'uksouth' # location name $RgName = 'packt_rg' # resource group name $SAName = 'packt100sa' # Storage account name $NSGName = 'packt_nsg' # NSG name $FullNet = '10.10.0.0/16' # Overall networkrange $CLNet = '10.10.2.0/24' # Our cloud subnet $GWNet = '192.168.200.0/26' # Gateway subnet $DNS = '8.8.8.8' # DNS Server to use $IPName = 'Packt_IP1' # Private IP Address name $VMName = "Packt100" # the name of the vm $CompName = "Packt100" # the name of the VM host
- Just in case, log in to Azure and ensure the resource group and storage account exist:
Login-AzureRmAccount $RG = Get-AzureRmResourceGroup -Name $RgName ` -ErrorAction SilentlyContinue ...