az disk

Manage Azure managed disks.

Commands

Name Description Type Status
az disk list

List managed disks in a resource group.

Core Preview

az disk list

Preview

List managed disks in a resource group.

Return all managed disks that live in the specified resource group, including each disk's name, size (GB), SKU tier, and attachment state. Use this command for inventory, capacity planning, or to identify orphaned disks before cleanup.

az disk list --resource-group
             [--profile]
             [--subscription-id]

Examples

List disks in a resource group

az disk list --resource-group myrg34 --subscription-id 00000000-0000-0000-0000-000000000000

List using shell variables

az disk list --resource-group $rg --subscription-id $subId

Required Parameters

--resource-group

The resource group name.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--profile

Use the named profile for this command (overrides the active profile).

--subscription-id

Azure Subscription Id. Defaults to the active profile's subscription.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.