I ran in graph explorer and it showed me 20 unattached disk, however the workbook failed to show any of these orphaned disk, so I am left to question if the workbook is giving me accurate information.
esources
| where type =~ "microsoft.compute/disks"
| extend diskState = tostring(properties.diskState)
| extend diskSizeGB = toint(properties.diskSizeGB)
| extend skuName = tostring(sku.name)
| extend timeCreated = todatetime(properties.timeCreated)
| extend lastOwnershipUpdate = todatetime(properties.LastOwnershipUpdateTime)
| extend managedById = tostring(managedBy)
| where diskState == "Unattached" or isnull(managedById) or managedById == ""
| project name, resourceGroup, subscriptionId, location,
diskState, diskSizeGB, skuName, timeCreated, lastOwnershipUpdate, managedById, tags
| order by diskSizeGB desc
The above query was ran in graph explorer.
I ran in graph explorer and it showed me 20 unattached disk, however the workbook failed to show any of these orphaned disk, so I am left to question if the workbook is giving me accurate information.
esources
| where type =~ "microsoft.compute/disks"
| extend diskState = tostring(properties.diskState)
| extend diskSizeGB = toint(properties.diskSizeGB)
| extend skuName = tostring(sku.name)
| extend timeCreated = todatetime(properties.timeCreated)
| extend lastOwnershipUpdate = todatetime(properties.LastOwnershipUpdateTime)
| extend managedById = tostring(managedBy)
| where diskState == "Unattached" or isnull(managedById) or managedById == ""
| project name, resourceGroup, subscriptionId, location,
diskState, diskSizeGB, skuName, timeCreated, lastOwnershipUpdate, managedById, tags
| order by diskSizeGB desc
The above query was ran in graph explorer.