DevOps Buzz
Search…
Bash / Shell
Bitbucket
Distros
Elasticsearch
General
Guidelines / Standards
microk8s
Prometheus
RabbitMQ
VirtualBox
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
Copy link
Outline
Install on ubuntu
az account
List accounts
List locations
Set account
az network
Get subnet ID
az resource
List all resources
az vm
Force stop
Start
Get object by ID