Get Virtual Machines Performance Statistics with Powershell Part 1

When sizing a VMware environment, let’s say, for optimization purposes or re-architecting the existing environment. You’ll need a baseline of current situation, meaning, in terms of capacity and performance, what considerations have to be observed. When it comes to virtual machines, you can get individual VMs performance charts in vCenter GUI, but if you want all VMs statistics in a certain period of time, that’s where PowerCLI comes in.

In this post series, I am going to get VMs performance and capacity data in the last day and export it as a report. I will try to explain each part, so you can have a better understanding of Powershell logic.

Performance and Capacity info

I need two categories of information, one comes in virtual machine configuration, items like, Allocated memory, Disk Capacity, Number of vCPUs which can be found in Get-VM cmdlet, and the other comes in virtual machine performance statistics, which yo will have to look for in Get-Stat cmdlet. Therefore, here the challenge is combining these two outputs together as one report in a single table.

The following script gets virtual machines’ statistics for metrics, CPU, Memory, Disk, Disk Usage.

in the next blogpost, I will get into details of the script, explaining all the parts.

Leave a Reply

Your email address will not be published. Required fields are marked *