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

Re: Get SUM of VCPU from vms array

$
0
0

You are overwriting $report each time.

Since Get-VM accepts an array on the Name parameter, you can do

 

$newvms=@(

"myvm01",

"myvm02"

)

Get-VM-Name $newvms|

Measure-Object-Property NumCpu -Sum


Viewing all articles
Browse latest Browse all 228535


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