Getting the computer manufacturer, model, serial number and BIOS version is fairly simple with PowerShell. I created a function called Get-ComputerInfo that can get all this information from a set of computer names. The code uses WMI and the class Win32_BIOS. The only parameter that must be passed to the Get-ComputerInfo function is the -ComputerName. Multiple computers names can be specified by separating each computer name by a comma "," or by creating a file with computer names one in each line and using Get-ComputerInfo( Get-Content "Filename.txt" )
The code is "As Is" I am not responsible for any bugs or problems it may create. I have been using it and I have not encounter any issues with it but it is the responsibility of the tech using the script to understand it and to be able to troubleshoot if any problems were to arise. Feel free to share and modify the code and make sure to provide a reference to my blog post.
Create a script or module and add the following lines of code to it:
Gets the computer manufacturer, model,BIOS version and serial number
This script uses WMI to retrieve instances of Win32_BIOS,
and gets the computer manufacturer, model,BIOS version and serial number.
Get-ComputerInfo -ComputerName LocalHost
This will get the manufacturer, model,BIOS version and serial number
on the local computer
Get-ComputerInfo -ComputerName ( Get-Content ./ComputerList.txt )
This will grab the computer list stored on the file ComputerList.txt
and use all them to get the manufacturer, model,BIOS version and serial number
on every computer on the list.
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)]
Write-Verbose -Message "Getting information about computers: $ComputerName"
Get-WmiObject -ComputerName $ComputerName -class Win32_BIOS |
Select PSComputerName,Manufacturer,Model,SMBIOSBIOSVersion,SerialNumber |
Write-Verbose -Message "Done getting information about comptuers: $ComputerName"
Computer Tech, interest in gaining a greater knowledge about most subjects, specially computer related.