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

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