I got hot add enabled on my VMs. how do I use the set-vm -MemoryGB to add2GB?
i tried
set-vm -vm (get-vm -name (get-content ./vm.txt)) -MemoryGB ((get-vm -name (get-content ./vm.txt)).MemoryGB + "2")
Set-VM: Cannot convert 'System.Object[]' to the type 'System.Decimal' required by parameter 'MemoryGB'. Specified method is not supported.
PS /Users/twong/Powershell/Vmware>
It looks as if that VM has more than 1 Harddisk, hence the array indication in the error message
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
i only waant set memorygb
In that case, the part get-vm -name (get-content ./vm.txt) is returning more than 1 VM.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference