Connect

Connect

Login

az login

Show the current subscription

az account show

List all available subscriptions

az account list

Set an Azure subscription

# Set subscription by Id
az account set --subscription XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

# Set subscription by Name
az account set --subscription "Company Subscription"

Resource group

Create a new resource group

az group create --location {location} --resource-group {name of new resource group}

VM

Create a new VM

az vm create --resource-group {rg name} --name {name of the vm} --image {image name}
Last modified July 21, 2024: update (e2ae86c)