Azure Classroom notes 27/Oct/2019

Creating a Multitier Network Using CLI and Powershell

Preview

Azure CLI

Steps

  • 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 '10.10.0.0/16' --location 'CentralUs' --subnet-name 'mangement' --subnet-prefixes '10.10.0.0/24'

Azure PowerShell

Install-Module -Name Az -AllowClobber -Scope AllUsers
  • Re-Launch PowerShell and execute
# Connect to Azure with an interactive dialog for sign-in
Connect-AzAccount
  • 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'

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube