Tuesday, July 9, 2013

VMware Powercli command to get the esxi5.x host wwn number

Take VMware powercli console and connect to vCenter, use the following vmware power cli command to get the wwn number.

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Connect-VIServer vcenterserver (vcenter servername)

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>Get-VMHostHba -VMHost ESXi01 | Select VMHost,Device,@{N="WWN";E={"{0:X}" -f $_.PortWorldWideName}}

output will be as follows

VMHost                                            Device                                            WWN
------                                            ------                                            ---
ESXi01                                        vmhba0                                            218000E08B000186
ESXI01                                        vmhba1                                           218100E08B200186

To get the status of HBA


Get-VMHostHba -VMHost (hostname).


No comments:

Post a Comment