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

Re: Powershell script to see paths

$
0
0

Would something like this do ?

 

foreach($esxinGet-VMHost){  foreach($hbain (Get-VMHostHba-VMHost$esx-Type"FibreChannel")){    $target=$hba.VMhost.ExtensionData.Config.StorageDevice.ScsiTopology.Adapter|      where {$_.Adapter-eq$hba.Key} |%{$_.Target}    $luns=Get-ScsiLun-Hba$hba-LunType"disk"-ErrorActionSilentlyCOntinue|Measure-Object|Select-ExpandPropertyCount
    $nrPaths=$target|%{$_.Lun.Count} |Measure-Object-Sum|select-ExpandPropertySum
   
$hba|Select@{N="VMHost";E={$esx.Name}},@{N="HBA";E={$hba.Name}},
    @{N="Target#";E={if($target-eq$null){0}else{@($target).Count}}},@{N="Device#";E={$luns}},@{N="Path#";E={$nrPaths}}  } }

Viewing all articles
Browse latest Browse all 232869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>