VMware Cloud Community
tdubb123
Expert
Expert

need to get sum of all hard didks

how do I modify this to get the total sum of all vmdk/VM?

Screen Shot 2017-08-03 at 9.42.24 AM.png

0 Kudos
1 Reply
LucD
Leadership
Leadership

Try changing that line into

$result.HardDiskCapacityGB = Get-HardDisk -VM $vm | Measure-Object -Property CapacityGB -Sum | select -ExpandProperty Sum


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos