Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 192300

Re: Script to set the CPU and Memory for VMs

$
0
0

you could do this with the column headers being:

 

VMName,CPU,MEM

 

$vmlist = Import-CSV C:\csvfile.csv

 

foreach ($item in $vmlist) {

    $vmname = $item.vmname

    $cpu = $item.cpu

    $mem = [int]$item.mem * 1024

    Set-VM -VM $vmname -NumCpu $cpu -MemoryMB $mem -RunAsync -Confirm:$false

}


Viewing all articles
Browse latest Browse all 192300

Trending Articles



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