Gets a list of all paths and their policy settings

# Gets a list of all paths and their policy settings(this is for storage related multipathing)

Connect-VIServer MYVISERVER

$ESX = get-vmhost "MyESXHost.mydomain.com" | Get-View

$Information = @()
foreach($disk in $esx.Config.StorageDevice.ScsiLun){
    $MyDetails = "" | Select-Object Name, Policy
    foreach($lun in $esx.Config.StorageDevice.MultipathInfo.Lun){
        if($disk.CanonicalName -eq $lun.Id){
            $MyDetails.Name = $disk.CanonicalName 
            $Mydetails.Policy = $lun.Policy.Policy
            $Information += $MyDetails
        }
    }
}
$Information

Comments

Popular posts from this blog

esxi-host-shows-disconnected-vmware

ESXi : Lost uplink redundancy on virtual switch "vSwitch0". Physical NIC vmnic0 is down

Virtual machines appear as invalid or orphaned in vCenter Server