Azure Classroom notes 27/Oct/2019

Creating a Multitier Network Using CLI and Powershell


Azure CLI


  • Launch a Powershell or other terminal and execute the following
az login 
# Enter your azure credentials 

  • Create a Virtual Network and one management subnet
# Create a resource group
az group create --location 'CentralUs' --name 'multitier'

# Create a Virtual Network
az network vnet create --name 'multitiervnet' --resource-group 'multitier' --address-prefixes '' --location 'CentralUs' --subnet-name 'mangement' --subnet-prefixes ''

Azure PowerShell

Install-Module -Name Az -AllowClobber -Scope AllUsers
  • Re-Launch PowerShell and execute
# Connect to Azure with an interactive dialog for sign-in
  • Cmdlets will be in form of ‘<verb>-Az<noun>’
  • Searching Resource Group Commands
Get-Command '*-AzResource*'
# From the output choose a command
Get-Help New-AzResourceGroup -Online
# Create a Resource Group and store the result object in a variable
$resg = New-AzResourceGroup -Name 'multitierps' -Location 'CentralUs'

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner