Skip to content

Instantly share code, notes, and snippets.

@esarabadani
Created June 27, 2023 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esarabadani/33714543d670974d3d172cbfa62d06fe to your computer and use it in GitHub Desktop.
Save esarabadani/33714543d670974d3d172cbfa62d06fe to your computer and use it in GitHub Desktop.
resources
| where type == "microsoft.compute/virtualmachines"
| extend id = tolower(tostring(properties.storageProfile.osDisk.managedDisk.id))
| project vm_name=name, id
| join (resources
| where type == "microsoft.compute/disks" and sku.name == "Premium_LRS"
| project name, id=tolower(id), type=sku.name) on id
| project vm_name, disk_id=id, type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment