Creating a Multitier Network Using CLI and Powershell

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'
Like this:
Like Loading...