Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251579

Paths report not matching gui

$
0
0

All,

We have a script we were planning to use to find dead, standby, and active paths, but it doesn't seem to match up to the gui every time.  Any idea why?  Is this cmdlet out of date?

 

$results= @()

 

foreach ($VMHostin$VMHosts) {

##   Get-VMHostStorage -RescanAllHba -VMHost $VMHost | Out-Null

[ARRAY]$HBAs=$VMHost | Get-VMHostHba-Type"FibreChannel"

 

      foreach ($HBAin$HBAs) {

    $pathState=$HBA | Get-ScsiLun | Get-ScsiLunPath | Group-Object-Propertystate

    $pathStateActive=$pathState | ? { $_.Name -eq"Active"}

    $pathStateDead=$pathState | ? { $_.Name -eq"Dead"}

    $pathStateStandby=$pathState | ? { $_.Name -eq"Standby"}

    $results+="{0},{1},{2},{3},{4},{5}"-f$VMHost.Name, $HBA.Device, $VMHost.Parent, [INT]$pathStateActive.Count, [INT]$pathStateDead.Count, [INT]$pathStateStandby.Count

    }

 

}

ConvertFrom-Csv-Header"VMHost","HBA","Cluster","Active","Dead","Standby"-InputObject$results | Ft-AutoSize


Viewing all articles
Browse latest Browse all 251579

Trending Articles