Here are a few methods to retrieve the computer’s serial number from the command line.
Using WMIC
wmic csproduct get IdentifyingNumber /format:list
wmic bios get SerialNumber /format:list
Using PowerShell (Call to WMI)
(Get-WmiObject -cl win32_BIOS).SerialNumber
HTML Application (HTA) Using VBScript
Download