So I'm using this:
Get-VM -location "folder" | Select-Object Name, NumCPU, MemoryGB | Export-Csv "C:\CPU_Memory.csv" -NoTypeInformation
How can I get the script to calculate the totals for the NumCpu and MemoryGB and add them to the csv ?
Also, this works per folder, how can I modify this to work per vCenter. What I'd ideally end up with is a script that looks into each folder and reports on the total NumCPU and MemoryGB values.
Thanks!