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
------------------------------------------------------------------
If you found this answer useful please consider the use of the Helpful or Correct buttons to award points.
Thanks,
Marc Crawford
CCNA, MCSE, MCTS, A+, Net+, Sec +, VCA-WM, VCA-DCV, VCA-Cloud, VCA-NV, VCP-NV, VCP-DCV, VCP, VCAP5-DCA
http://gplus.to/marccrawford
http://blog.marccrawford.com
@uber_tech_geek