Skip to content

This query did not show my Unattached disk #86

@howardBere

Description

@howardBere

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions