PowerShell script to set memory on all VDI virtual machines

Of course, you can use SCVMM and simply change the template.
But perhaps you don’t have the time to re-create all the VDI machines? Or some other reason?
A simple power off, run script, and power on can be a lot faster…

With PowerShell you can accomplish this with just two lines of code:

$VMS = get-vm | ? {$_.name -like “VDI*”}
$VMS | Set-VMMemory -Memory 2048

Leave a Reply

Your email address will not be published. Required fields are marked *