Hello @Mr India
You can use the Azure Resource Graph Explorer to export VM configuration data, including CPU, RAM, OS disk size, and data disk size.
The Azure Resource Graph Explorer allows you to run Kusto Query Language (KQL) queries against your Azure resources and export the results to a CSV file. To export VM configuration data using the Azure Resource Graph Explorer, you can follow these steps:
- Open the Azure Resource Graph Explorer in the Azure portal.
- Write a KQL query to retrieve the VM configuration data.
Here's an example query:
Resources | where type == 'microsoft.compute/virtualmachines'
| extend vmSize = tostring(properties.hardwareProfile.vmSize)
| extend osDiskSize = tostring(properties.storageProfile.osDisk.diskSizeGB)
| extend dataDiskSize = tostring(properties.storageProfile.dataDisks[0].diskSizeGB)
| project name, vmSize, osDiskSize, dataDiskSize
This query retrieves all virtual machines in your subscription and projects the name, VM size, OS disk size, and data disk size.
- Run the query and export the results to a CSV file. To export the results to a CSV file, click the "Export" button in the Azure Resource Graph Explorer and select "CSV (current view)".
- Open the CSV file in Excel or another spreadsheet program to view and analyze the data. I hope this helps! Let me know if you have any other questions.
Sample queries:
https://learn.microsoft.com/en-us/azure/virtual-machines/resource-graph-samples?tabs=azure-cli
If I have answered your query, please click "Accept as answer" as a token of appreciation