Get-VMHost <vmhost> -PipelineVariable esx | Get-ScsiLun -LunType disk -PipelineVariable lun | Get-ScsiLunPath |
Select @{N='ESX';E={$esx.Name}}, @{N='LUN';E={$lun.CanonicalName}}, LunPath, State, @{n='WWN';e={
$wwn = Get-VMhost $esx | Get-VMHostHBA -Type FibreChannel | select @{N="WWN";E={"{0:X}" -f $_.PortWorldWideName}} | select -ExpandProperty WWN
if ($_.LunPath -like "*vmhba1*"){
$wwn[0]
}else{
$wwn[1]
}
}
}
Works fine, thanks, LucD ![]()
How can I look deeper and get the full path information like esxcli storage core path list command?
UID: <adapter id>+<target id>+<LUN canonical name>
Runtime Name: <LDEV>
Device: <naa>
Adapter: vmhba0
Target: <target number>
LUN: <LUN id>
State: active
Transport: fc
Adapter Identifier: <adapter ID>
Target Identifier: <target ID>
Adapter Transport Details: WWNN: <why not?> WWPN: <...>
Target Transport Details: WWNN: <...> WWPN: <...>