> 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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.m4lwhere.org/cloud/azure-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
