Getting Computer Serial Number

by Jan 28, 2015

All PowerShell versions

In a previous tip we illustrated how you can take a DELL serial number and check online the warranty status. Other vendors may offer similar services.

Here is a piece of code that can read the serial number:

$ComputerName = $env:COMPUTERNAME

$serial = (Get-WmiObject -ComputerName $ComputerName -Class Win32_BIOS).SerialNumber
"Your computer serial is $serial" 

Twitter This Tip! ReTweet this Tip!