Windows Server 2012: Doing multiple configuration changes on Hyper-V VMs via PowerShell
Over the weekend I was Setting up my lab for the RTM of System Center 2012. I created some Windows Server 2008 R2 Virtual Machines on my Windows Server 2012 beta Hyper-V server. After I had created all VMs and installed them, I realized I forgot to configure the limit for Dynamic Memory for the Hyper-V Virtual Machines.
Now here the new PowerShell module for Hyper-V which comes with Windows Server 2012 helped me save some time.
First I check the Dynamic Memory Maximum value for all my System Center 2012 Virtual Machines.
Get-VM -Name SC2012* | ft Name, MemoryMaximum
After that I changed the value from all my System Center 2012 Virtual Machines to 8GB
Get-VM -Name SC2012* | Set-VM -MemoryMaximumBytes 8589934592
btw. if you don’t know that 8GB are 8589934592 Bytes PowerShell can help you, check this out:
Get-VM -Name SC2012* | Set-VM -MemoryMaximumBytes 8GB