the below code works great against a 5.0 vCenter instance but does not work against vCenter 5.0U1. Any thoughts as to why?
Get-VM | Where { $_.PowerState -eq "PoweredOn" } | Get-VMGuest | Select VmName -ExpandProperty Disks | Select VmName, Path, @{ N="PercFree"; E={ [math]::Round( ( 100 * ( $_.FreeSpace / $_.Capacity ) ),0 ) } } | Sort PercFree | Export-Csv C:\scripts\freespace.csv -NoTypeInformation
PowerCLI Version
----------------
VMware vSphere PowerCLI 5.0.1 build 581491
---------------
Snapin Versions
---------------
VMware AutoDeploy PowerCLI Component 5.0 build 544967
VMware ImageBuilder PowerCLI Component 5.0 build 544967
VMware License PowerCLI Component 5.0 build 544881
VMware vSphere PowerCLI Component 5.0 build 581435