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

Get SUM of VCPU from vms array

$
0
0

Hi!

How i can get sum of VCPU of vms from array?

Whats wrong in my script?

$newvms = @(
"myvm01",
"myvm02"
)
Foreach ($newvm in $newvms) {
$report = Get-VM | ? name -Like $newvms*
}
$report | Measure-Object numcpu -Sum

Viewing all articles
Browse latest Browse all 228535

Trending Articles