Can you check with Get-StatType if that metric is indeed not present for a specific VM, or for all VMs?
This can also be caused by 1 VM, which perhaps wasn't powered at the $start time, who is missing that metric.
Can you add the -ErrorAction Slinetly continue parameter on the Get-Stat cmdlet.
Why do you do the Get-Stat four time?
You can do that in one call, with multiple metrics.
Also, why add the MaxSamples parameter when you use the Start parameter?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference