Get WWNs from all HBAs in ESXi Host

$hbas = Get-VMHostHba -VMHost $vmHost -Type FibreChannel
foreach ($hba in $hbas) {
    $wwpn = (&{param ($s) for($i=14;$i -gt 0;$i-=2) {$s=$s.insert($i,":")} return $s}("{0:x}" -f $hba.PortWorldWideName))
    Write-Host "`t" $hba.Device "|" $hba.model "|" "World Wide Port Name:" $wwpn
}