Quantcast
Channel: VMware Communities : All Content - VMware PowerCLI
Viewing all articles
Browse latest Browse all 16717

Script to count host build numbers

$
0
0

Hi,

 

Our environment has a mixture of hosts on different build numbers. I'm trying to write a script that will show a count of how many hosts are running each build number. That way I can export it to Excel and make a pie graph to show the spread of versions.

 

Using the ImportExcel module, I can create a pie graph but it counts every single result as a new value to graph

 

This code "PieChart -title "Test" (Get-VMHost | Select Version, Build)" generates a graph like below

 

 

If I could spit out counts like in the table below, I'd be able to create a Pie Chart like this:

  

ESXi BuildCount
6.0.0-460094410
6.0.0-50505933
6.0.0-52249345
6.0.0-55726564
6.0.0-67650622
6.0.0-69213843
6.0.0-750463764

 

Thoughts?


Viewing all articles
Browse latest Browse all 16717

Trending Articles



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