Using Console
Using CLI
az vm list --query "[].{name:name,resourceGroup:resourceGroup}" --output table
This will list all the virtual machines in your subscription along with their resource group.
az disk list --query "[].{name:name,resourceGroup:resourceGroup}" --output table
This will list all the disks in your subscription along with their resource group.
az disk delete --name <disk-name> --resource-group <resource-group-name>
Replace <disk-name>
with the name of the unattached disk and <resource-group-name>
with the name of the resource group the disk belongs to.
Using Python
DefaultAzureCredential
class: