Hi @Anonymous ,
The script link that you have posted is a custom Powershell script so you have to tweak that according to your requirements.
Also, are you looking to specifically export the required details to a csv automatically?
If not, then you can also check these metrics from the Portal-> under your VM -> Monitoring.
Getting average CPU and Memory usage for all azure VMs in a resource group
Hello,
I am trying to get average cpu & memory utilization for VMs in a resource group via script so I can export the required details to a CSV file. I have a mix of linux & windows VMs within this RG. Tried a PS script with get-wmiobject module with a checkpoint condition ( with test-path) but this seems to give me the null output even for the windows vm . Are there azure cli/ powershell commands that can give this? Explored azuremetrics module but looks like this does not provide average memory utilization. Any pointers towards the right direction would be much appreciated.
I tried the PS script provided at https://www.powershellbros.com/run-script-to-check-cpu-and-memory-utilization/
Thanks & Regards
Suneel
Azure Virtual Machines
1 answer
Sort by: Most helpful
-
srbhatta-MSFT 8,586 Reputation points Microsoft Employee
2022-11-22T05:25:04.807+00:00