I am trying to write a script that will set a memory reservation on all vm's to what the vm memory is. This way all swap files will be 0.
I am not sure of $_.MemoryMB will give me the correct setting.
$vm = Get-VM
foreach ($vm_single in $vm)
{Get-VMResourceConfiguration | Set-VMResourceConfiguration -MemReservationMB $_.MemoryMB
}
Get-VMResourceConfiguration -VM $vm_Single | Select -ExpandProperty DiskResourceConfiguration
Thanks
Marc