VMware Cloud Community
johanham
Contributor
Contributor
Jump to solution

Sum of NumCpu

Hi,

I need to provide my license department with the number of physical cores in my environment.

How could I sum NumCpu in an easy way?

Cheers

Johan

Get-vmhost

fra-sf01-esx05.abc.local     36

fra-sf01-esx06.abc.local     36

fra-sf01-esx07.abc.local     36

fra-sf01-esx10.abc.local     36

fra-sf01-esx08.abc.local     36

fra-bc01-esx07.abc.local     24

fra-bc01-esx06.abc.local     24

fra-bc01-esx08.abc.local     24

fra-bc01-esx04.abc.local     36

fra-bc01-esx13.abc.local     24

fra-bc01-esx05.abc.local     36

fra-bc01-esx12.abc.local     24

fra-bc01-esx03.abc.local     36

fra-bc01-esx09.abc.local     24

fra-bc01-esx10.abc.local     24

fra-bc01-esx11.abc.local     24

fra-sf01-esx02.abc.local     36

fra-sf01-esx01.abc.local     36

fra-sf01-esx03.abc.local     36

fra-sf01-esx04.abc.local     36

fra-sf01-esx09.abc.local     36

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

If you want just the total sum, you could do

Get-VMHost |

Measure-Object -Property NumCpu -Sum |

Select -ExpandProperty Sum


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

If you want just the total sum, you could do

Get-VMHost |

Measure-Object -Property NumCpu -Sum |

Select -ExpandProperty Sum


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
johanham
Contributor
Contributor
Jump to solution

Many thanks LucD!

0 Kudos