If i may..
Your script looks good, and to push it a little you could do something like this
Get-Content C:\tmp\VMList.txt | Get-VM -Name $_ | Get-VMResourceConfiguration | Set-VMResourceConfiguration -MemReservationMB 1024 -MemLimitMB 2048
The Foreach isnt needed because Get-Content send an array object to the pipeline (like foreach )