Hi Robin Hitch
Welcome to Microsoft Q&A Forum, thank you for posting your query here!
Please use "Azure Resource Graph Explorer" to fetch this data.
Please find the below screenshot of the output for your reference
You can also pin this to the dashboard once the results have been populated
Below is the sample code you need to modify the code based upon the requirement
Resources
| where type in ("microsoft.compute/virtualmachines", "microsoft.hybridcompute/machines")
| extend ComputerName = name
| extend vmSize = properties.hardwareProfile.vmSize
| extend RAM = tostring(properties.hardwareProfile.vmSizeProperties.memoryInMB / 1024) // Convert to GB
| extend CPU = tostring(properties.hardwareProfile.vmSizeProperties.vCPUsAvailable)
| extend osDiskSize = tostring(properties.storageProfile.osDisk.diskSizeGB)
| extend osType = properties.storageProfile.osDisk.osType
| extend isArcEnabled = type == "microsoft.hybridcompute/machines"
| extend OSVersion = properties.extended.instanceView.osVersion
| extend VMType = iif(isArcEnabled, "Hybrid (Arc)", "Azure VM")
| project ComputerName, vmSize, RAM, CPU, osDiskSize, osType, OSVersion, VMType, location
For Azure Arc machines you use this below reference document to fetch the data
Refer: https://learn.microsoft.com/en-us/azure/azure-arc/servers/resource-graph-samples?tabs=azure-cli
MS document for Azure Virtual Machine
Refer: https://learn.microsoft.com/en-us/azure/virtual-machines/resource-graph-samples?tabs=azure-cli
Above are the links which has the sample codes and example so that you can refer it and make use of it.
let us know if any help, we will always help as you needed.! Please provide your valuable feedback
Please do not forget to "Accept the answer” wherever the information provided helps you, this can be beneficial to other community members.