Mulitpath validation script not giving the right output after upgrading the ESXi version from 5.5 to 6.0
On ESXi 5.5, it used to give the right results like which are paths are dead, active, standby. But, on ESXi 6.0, all the paths status showing as 'StandBy' only.
Can some one help in this regard....
That is a know issue I'm afraid.
See Re: powercli shows paths as standby, but they are active on vsphere client and web client for an alternative solution.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That is a know issue I'm afraid.
See Re: powercli shows paths as standby, but they are active on vsphere client and web client for an alternative solution.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thank you LucD.
How to put in a right format in .csv output (Host name, Number of paths, Name of the HBA, Path Status)
Something like this?
$report = foreach($esx in Get-VMHost){
$esxcli = Get-EsxCli -VMHost $esx -V2
foreach($adapter in $esxcli.storage.core.adapter.list.Invoke() | where{$_.Driver -match 'fc'}){
$esxcli.storage.core.path.list.Invoke() | where{$_.Adapter -eq $adapter.HBAName} |
Group-Object -Property Device |
Select @{N='VMHost';E={$esx.Name}},
@{N='HBA';E={$adapter.HBAName}},
@{N='Device';E={$_.Name}},
@{N='Path#';E={$_.Group.Count}},
@{N='PathStatus';E={($_.Group.State | Sort-Object -Unique) -join ','}}
}
}
$report | Export-Csv .\report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference