Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

Try like this.

If you leave out the Where-clause, you'll get the state of all paths.

Get-VMHost | % {

     $server = $_

      ($_ | Get-View).config.storagedevice.multipathinfo.Lun | %{$_.Path} | `

      select Name, PathState | `

      where {$_.PathState -eq "dead"} | `

      Add-Member -PassThru NoteProperty Server $Server.Name | `

      Select Server, Name, PathState

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post