Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 178257

Set Memory Reservation & Limit For List Of VMs

$
0
0

Can someone help me write a script on how to set the memory reservation and limit for a list of VMs from a text file. My lab is down right so I can't test my script to see if it works but i desperately need to make the change in production. I would be glad if anyone can tell me if they see anything wrong with it or any advice or input. Thanks

 

Get-Content -Path C:\tmp\VMList.txt | ForEach-Object {
  Get-VM -Name  $_ | `
  Get-VMResourceConfiguration | `
  Set-VMResourceConfiguration -MemReservationMB 1024 -MemLimitMB 2048
}

 

 

VMList.txt

 

vm1

vm2

vm3

vm4

vm5


Viewing all articles
Browse latest Browse all 178257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>