PowerCLI: How many HBA’s ?

I needed a quick one-liner today to help me find out how many HBA’s my hosts had, the following one-liner needs no more introduction:

Get-VMHost | Select Name, @{N="FibreHBAs";E={($_ | Get-VMHostHba | Where { $_.Type -eq "FibreChannel"} | Measure-Object).Count}} | Out-GridView

Output:

image

And of course you can easily add it to VESI/PowerGUI:

image

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.