we have both powerpath V/E and NONPowerpath Lun
Solution:
$ESXServers = Get-vmhost
$ESXServers | %{
$ESX = $_
# Get SCSI LUNs
$objViewESX = Get-View -id $ESX.id
$objViewESXstorageSys = Get-View -id $objViewESX.ConfigManager.StorageSystem
$objSCSIdisks = $objViewESXstorageSys.StorageDeviceInfo.ScsiLun | Where-Object{$_.DeviceType -eq "disk"} | %{
#Capacity in MB
$BlockSize = $_.Capacity.BlockSize
$Block = $_.Capacity.Block
$CapacityMB = ((($Block*$BlockSize)/1024)/1024)
Write-Host " $CapacityMB"
#Canonical Name
Write-Host "$_.CanonicalName"
}
}
Thanks for your inputs.