Using the info from LucD and jeveenj's posts, I mashed the following script to collect data from our multiple Vcenter instances, report includes info for socket and core count:
_________________________________________
$viservers = "vcenter1","vcenter2","vcenter3","vcenter4"
foreach ($singleViserver in $viservers)
{
Connect-VIServer $singleViserver
$HostReport = @()
Get-VMHost |Get-View |%{
$Report = "" | select Hostname, version, Build, manufacture, Model,cpu_model, cpu_num, core_num, ip_address,vmotion_ip, HBA_num, P_nic
$Report.Hostname = $_.Name
$Report.version =$_.Config.Product.Version
$Report.Build =$_.Config.Product.Build
$Report.manufacture =$_.Hardware.SystemInfo.Vendor
$Report.Model =$_.Hardware.SystemInfo.Model
$Report.cpu_model =$_.Summary.Hardware.CpuModel
$Report.cpu_num =$_.Hardware.CpuInfo.NumCpuPackages
$Report.core_num =$_.Hardware.CpuInfo.NumCpuCores
if($Report.version -like "3.5.*"){
$Report.ip_address =$_.Config.Network.ConsoleVnic.Spec.ip.ipaddress
}
else {$Report.ip_address =$_.Config.Network.ConsoleVnic[0].Spec.ip.ipaddress}
$Report.vmotion_ip =$_.Config.Vmotion.IpConfig.IpAddress
$Report.HBA_num =$_.Summary.Hardware.NumHBAs
$Report.P_nic =$_.Config.Network.Pnic.count
$HostReport += $Report
}
}
$HostReport | Export-Csv ".\Full-HostReport.csv" –NoTypeInformation
_________________________________________
Thought someone else may look for this exact code since I was looking for it. As noted, it requires the latest version of PowerCli
Good work LucD and jeveenj!!
Ty Lopes