DevOps Buzz
Search…
⌃K

CLI/Powershell

Install on ubuntu

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

az account

List accounts

az account list

List locations

az account list-locations

Set account

az account set --subscription "YOUR SUBSCRIPTION"

az network

Get subnet ID

az network vnet subnet show -g YOUR-RG -n YOUR-SUBNET --vnet-name YOUR-VNET -otsv

az resource

List all resources

az resource list
Get-AzureRmResource

az vm

Force stop

az vm stop --resource-group YOUR-RG --name YOUR-VM-NAME --skip-shutdown

Start

az vm start --resource-group YOUR-RG --name YOUR-VM-NAME

Get object by ID

Get-AzureADObjectByObjectId -ObjectIds a183a290-4fa6-4a8f-b406-033429ec7119