I am reading an input file and then running Get-WmiObject -Class Win32_ComputerSystem and Get-WmiObject -Class Win32_BIOS. The output is two seprate groups of column data. I want it to be one group with all the columns from the output from both Get- statements. Is that possible?
Here is the syntax and the output.
#
$computers = Get-Content -Path c:\temp\input.txt
Get-WmiObject -Class Win32_ComputerSystem -computername $computers | select Model,Name | format-table -autosize
Get-WmiObject -Class Win32_BIOS -computername $computers | select SerialNumber | format-table -autosize
#
Model Name
----- ----
OptiPlex 3050 wrksta-001
OptiPlex 390 wrksta-002
OptiPlex 3010 wrksta-003
SerialNumber
------------
1JS62G7
J4LD8YE
C4K6I77
I am trying to get one group with columns Model, Name, SerialNumber.
Would appreciate any guidance.