New Posts‎ > ‎

Inactive LUN Paths on ESXi host.

posted May 23, 2016, 10:39 AM by Kris Knight   [ updated Jun 14, 2016, 11:48 AM ]
<# 
.SYNOPSIS
Checks ESXi Host lun paths for Dead Path scenerio.
.DESCRIPTION
Created to check and look for Paths that are not "active". If paths are found, they are listed for that host.
.EXAMPLE
.\GET-DeadPath.ps1  <ESXi Name>
or
.\GET-DeadPath.ps1 *
.NOTES
Author: KnightUSN
Version: 1.0 May 2016
#>

param(
    [parameter(Mandatory = $true)]
    [string[]]$Param
    )


$VHs = Get-VMHost $Param -State Connected

ForEach ($VH in $VHs){
$VHcli = $VH | Get-ESXcli
Write-Host "Checking "$VH.name" for Dead Path" 
$VHcli.storage.core.path.list() | ?{$_.state -ne "active"}
}
Comments