I have been using this in a VM build script with $MEM being the gigabytes of RAM assigned to the VM. I use this line to reserve the RAM
Get-VM $VMName | Get-VMResourceConfiguration | Set-VMResourceConfiguration -MemReservationGB $MEM -Confirm:$false
It does not check the box in the GUI but it does reserve the RAM.
Original Message:
Sent: Apr 15, 2020 01:00 PM
From: acederlund
Subject: vCD and PowerCLI - get/set VM Mem reservation?
Hi,
I've been trying to find out where I can read (and hopefully, set) the VM Mem reservation properties for a VM.
It's possible to set via the GUI, but I've yet to find any good PowerCLI magic to do this with.
Any suggestions?
/Andreas