I am working on a script to query remote servers for configuration information and return the data for output to gridview. The issue I am having is the format in which the data is returned.
If I do...
((Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors | Measure-Object).Count
((Get-CimInstance -ClassName Win32_PhysicalMemory).Capacity | Measure-Object -Sum).Sum /1GB
in a ps1 and run that on a remote server using Invoke-Command, I get an array back with only numbers like this.
2
4
How can I gather this information with context from multiple machines efficiently? I tried remote jobs, but I can't really run more than 2 jobs at a time. I would like to spread out the work to all of the target servers like this.