Quick System Info – Powershell

Here is a PowerShell script to get basic system inventory information about your computers and parse it into CSV format.
Tested on Dell,HP, and Lenovo systems.

$MyArray = $null
$MyArray = @()
$ComputerList = Get-Content "C:\Scripts\Computers.txt"
ForEach ($Computer in $ComputerList){
COMP = $Computer
$MyObj = "" | Select "Computer","Manufacturer","Model","ServiceTag","Memory","HDSerial","User"
$MyObj.Computer = $COMP
$MyObj.Manufacturer = Get-WmiObject Win32_BIOS -Computer $COMP |Select -ExpandProperty Manufacturer
$MyObj.Model = Get-WmiObject Win32_ComputerSystem -Computer $COMP |Select -ExpandProperty Model
$MyObj.ServiceTag = Get-WmiObject Win32_BIOS -Computer $COMP |Select -ExpandProperty SerialNumber
$MyObj.Memory = Get-WmiObject Win32_ComputerSystem -Computer $COMP |Select -ExpandProperty TotalPhysicalMemory
$MyObj.HDSerial = Get-WmiObject Win32_PhysicalMedia -Computer $COMP |Where-Object {$_.tag -like "*PHYSICALDRIVE0*"} |select -ExpandProperty SerialNumber
$MyObj.User = Get-WmiObject Win32_ComputerSystem -Computer $COMP |Select -ExpandProperty UserName
$MyArray += $MyObj
$MyObj = $null
}
$MyArray |export-csv "C:\Scripts\ComputerReport.csv"