Can you try with this version of your script?
Import-Csv -Path 'C:\temp\testvms.csv' | %{
Get-VM -Name $_.Name |
Get-HardDisk -Name 'Hard disk 1' |
Set-HardDisk -CapacityGB ($_.CapacityGB + 20) -Confirm:$false
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference