Virtu-Al.Net

Virtually everything is poshable

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 *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>