I have a task that I need to run and pull information from several places into a single spreadsheet. I believe I can get everything using PowerShell but I need help on trying to get everything into a single spreadsheet if its possible.
To make it easy and to see the concept I will just start with a couple items. I need to pull together all Servers with the OS and then query the machine for the Serial number of the machine. I know how to do each independently but don’t know if there is a way to have a spreadsheet with 3 columns with servername, OS, serial number. Here is the script I am thinking of using:
For servername and OS:
Get-ADComputer -Filter * -Properties operatingsystem | Where operatingsystem -match ‘server’ | Select Name, OperatingSystem
For Serial Number:
I can piple the first script into the second but I don’t think all the properties from the first come over but I may be wrong.