Contents

Reading BIOS AssetTag and Serial Number

Contents

A few weeks ago I was playing with a PowerShell script to read some values from the BIOS. Here the key commands in case you need it.

Initially open a PowerShell console with Admin rights, then run the one of the following commands directly from the prompt.

For all the info in the object Win32_ComputerSystem:

1
$ComputerDetails = (Get-WmiObject -Class Win32_ComputerSystem)

It will save in the variable ComputerDetails an object with Domain, Manufacturer, Model, Name, PrimaryOwnerName and TotalPhysicalMemory.

If you want only get the model for example, you can get it with:

1
$ComputerModel = (Get-WmiObject -Class Win32_ComputerSystem).Model

The class Win32_BIOS contains BIOSVersion, Manufacturer, Name, SerialNumber and Version.

To check all details, run:

1
(Get-WmiObject -Class Win32_BIOS)

For only serial number:

1
$ComputerSerial = (Get-WmiObject -Class Win32_BIOS).SerialNumber

Another class that contains information for BIOS is Win32_SystemEnclosure, it have Manufacturer, Model, SerialNumer and SMBIOSAssetTag

For all details, check:

1
(Get-WmiObject -Class Win32_SystemEnclosure)

For serial number and asset tag:

1
2
$ComputerSerial = (Get-WmiObject -Class Win32_SystemEnclosure | Select-Object SerialNumber).SerialNumber
$ComputerAssetTag = (Get-WmiObject -Class Win32_SystemEnclosure | Select-Object SMBIOSAssetTag).SMBIOSAssetTag

Hope you find it useful
Have fun!

Buy me a Coffee
Hope you find this useful, if you have any question please visit my twitter @bigg_blog and if you have a couple of pounds buy me a coffee.
G