I fgured it out in regard to the get-content... It's been a long day :smileyhappy:
Added to 2 items below in red and was able to pull the host name.
Thanks Again Luc
$esxName = get-content c:\temp\hostlist.txt
$dsTab = @{}
foreach($ds in (Get-Datastore -VMHost $esxName | where {$_.Type -eq "vmfs"})){
$ds.Extensiondata.Info.Vmfs.Extent | %{
$dsTab[$_.DiskName] = $ds.Name
}
}
$report = @()
Get-ScsiLun -VmHost $esxName -LunType "disk" | %{
$hostid = $_.VMHostID
$hostsrv = get-vmhost -id $hostid
$row = "" | Select Host, ConsoleDeviceName, Vendor, Model, Datastore
$row.host = $hostsrv.Name
$row.ConsoleDeviceName = $_.ConsoleDeviceName
$row.vendor = $_.Vendor
$row.model = $_.Model
$row.Datastore = &{
if($dsTab.ContainsKey($_.CanonicalName)){
$dsTab[$_.CanonicalName]
}
}
$report += $row}
$report |Export-Csv c:\Temp\results.csv -NoTypeInformatio