I double checked the TXT file, there are no blank lines. So with the updated script I get info in the PowerCLI window, eg>
Name PowerState Num CPUs MemoryGB
---- ---------- -------- --------
VM01 PoweredOn 1 0,500
The only issue is, it does not seem to want to display the cores per socket, and the report is blank when it finishes the last step
Below is what I am running:
$vmNames = Import-Excel -Path C:\Users\anton.louw\Desktop\Sockets.xlsx | Select -ExpandProperty vmName
Get-VM -Name $vmNames
Select Name,
@{N='Sockets';E={$_.ExtensionData.Config.Hardware.NumCpu}},
@{N='CoresPerSocket';E={$_.ExtensionData.Config.Hardware.NumCoresPerSocket}} |
Export-Csv -Path C:\Users\anton.louw\Desktop\report.csv -NoTypeInformation -UseCulture