VMware Cloud Community
MikeErter
Enthusiast
Enthusiast
Jump to solution

Get-VMHostHba doesn't return WWNs?

Hi PowerCLI community,

How come Get-VMHostHba  returns an HBAs world wide names in a bogus format?  I.e.:

NodeWorldWideName : 2305843171164295343

and

NodeWorldWideName : 2305843171164295343

whereas if you view this information in the vSphere client you actually see a WWN formatted as one would expect:

20:00:00:25:b5:02:10:af 20:00:00:25:b5:b2:10:5f

Is there a way to make Get-VMHostHba return WWNs in the 'normal' format?

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
DZ1
Hot Shot
Hot Shot
Jump to solution

You can modify it for multiple hosts with a foreach. 

Get-VMHost | select -First 1 | Get-VMHostHba -Type Fibrechannel | select @{ N="WWN"; E={ "{0:X}" -f $_.PortWorldWideName } }

View solution in original post

Reply
0 Kudos
3 Replies
DZ1
Hot Shot
Hot Shot
Jump to solution

You can modify it for multiple hosts with a foreach. 

Get-VMHost | select -First 1 | Get-VMHostHba -Type Fibrechannel | select @{ N="WWN"; E={ "{0:X}" -f $_.PortWorldWideName } }

Reply
0 Kudos
vin01
Expert
Expert
Jump to solution

check my ques this might be useful

Script to convert HBA WWNs to lowercase and add ":"

Regards Vineeth.K
Reply
0 Kudos
MikeErter
Enthusiast
Enthusiast
Jump to solution

DZ1,

I understand the calculated property you used there, but can you explain this bit some more?  "{0:X}" -f

Thanks!

Reply
0 Kudos