Forrest logo
back to the az tool

az:tldr:093dc

az: List all Azure Managed Disks.
$ az disk list
try on your machine

The command "az disk list" is used in the Azure Command-Line Interface (CLI) to retrieve a list of all managed disks in a specific Azure subscription or resource group.

By executing this command, you will get information about the Azure managed disks available in your subscription or resource group, including their names, resource group, location, disk size, and other relevant details. This command helps you to view and manage your managed disks easily from the command-line interface.

Here's an example output of this command:

[
  {
    "name": "myDisk",
    "resourceGroup": "myResourceGroup",
    "location": "eastus",
    "diskSizeGb": 128,
    ...
  },
  {
    "name": "anotherDisk",
    "resourceGroup": "anotherResourceGroup",
    "location": "westus",
    "diskSizeGb": 64,
    ...
  },
  ...
]

In this example, you can see two managed disks named "myDisk" and "anotherDisk" in their respective resource groups. The location indicates where the disk is located, and diskSizeGb represents their size in gigabytes. The ellipsis (...) represents additional details not shown for brevity.

By using the output of this command, you can perform further operations on the managed disks, such as updating their properties, attaching them to virtual machines, or deleting them.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the az tool