Powercli script to get VM’s disk Latency.

If you want to quickly check the virtual machine's Average and Max latency , here is the script for this : Get-VM -Name VmName | ? {$_.PowerState -eq "PoweredOn"} | Select Name, @{n="AVG Max Latency (ms)";e={(get-stat -Entity $_ -Stat Disk.MaxTotalLatency.Latest -Start (Get-Date).AddDays(-1) | Measure Value -Average ).Average }},@{n="Max Latency (ms)";e={(get-stat -Entity $_ -Stat Disk.MaxTotalLatency.Latest -Start … Continue reading Powercli script to get VM’s disk Latency.