![Forrest logo](/images/logo.png)
az-vm:tldr:818d3
The command "az vm list" is used in the Azure Command-Line Interface (CLI) to retrieve a list of virtual machines in an Azure subscription or resource group.
When you run the "az vm list" command, it will query the Azure management API and fetch the details of all the virtual machines present in the specified subscription or resource group. It will return a JSON-formatted output that provides information about each virtual machine, such as its name, resource group, status, size, IP addresses, and more.
By using various options and parameters, you can filter the output to narrow down the list of virtual machines based on different criteria. For example, you can specify the resource group or subscription to limit the list to specific scopes, or use options like "--query" to select specific properties of the virtual machines you want to see.
Overall, "az vm list" is a powerful command in the Azure CLI that enables you to easily retrieve information about virtual machines for further management and automation tasks.