How do I get the unattached disks and/or orphan disks in my environment using Azure Log Analytics

Occasional Visitor

Hello All,

 

I've a doubt, is possible I use Azure Log Analytics to get informations about unattached and orphan disk in my subscription?

 

I now that I can achieve this using PowerShell, but if possible I like to use KQL. 

 

Tks

1 Reply
Hi,
You might have found a solution, but this is how I get mine (or a variation of this):

resources
| where type =~ 'Microsoft.Compute/disks'
| where managedBy == ''
| project name, resourceGroup, Sku=sku.tier, DiskState=properties.diskState, location


Cheers
J