> For the complete documentation index, see [llms.txt](https://notes.m4lwhere.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.m4lwhere.org/cloud/azure-cli.md).

# Azure CLI

## Installation

Install via APT

`apt install azure-cli`

{% embed url="<https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt>" %}

## Configure

Log into the tool with either interactive login or inline

`az login`

`az login -u user@m4lwhere.org -p lmaoPass`

## AZ AD Analysis

We can start to analyze things about Azure AD

`az ad signed-in-user show`

`az ad user list -o table`

A slightly easier to view table

`az ad user list --query '[].{DisplayName:displayName,UserPrincipalName:userPrincipalName,UserType:userType}' -o table`

Find a list of the users in the domain and their permissions

`az role assignment list -o table`

## AZ VM Analysis

Find all of the systems assigned and running&#x20;

`az vm list -o table --resource-group m4lwhere-resources`

Get additional information

`az disk list -o table --resource-group m4lwhere-resources`

Now we may be able to check for any snapshots of the systems

az snapshot list -o table
