Hello LUCD,
Thanks for help. Can we modify your previous below script to get output of esxi host name, lun id, adapter and path number. So we can identify for each lun, from each adapter how many paths are present.
$esxName = 'esx1','esx2','esx3'
$report= @()
$esxilist = Get-VMHost -Name $esxName
foreach( $esxvm in $esxilist){
$esx = Get-VMHost -Name $esxvm
$esxcli = Get-EsxCli -VMHost $esxvm
$hba = Get-VMHostHba -VMHost $esx -Type FibreChannel | Select -ExpandProperty Name
$esxcli.storage.core.path.list() |
Where{$hba -contains $_.Adapter} |
Group-Object -Property Device | %{
$row = "" | Select ESXihost, Lun, NrPaths
$row.ESXihost = $esxvm.name
$row.Lun = $_.Name
$row.NrPaths = $_.Group.Count
$report += $row
}
}
$report | Export-Csv esx-lun-path.csv -NoTypeInformation -UseCulture