12 March 2012

Retrieve PC serial number from the command line

Enter the following at the command prompt, to retrieve the machine's serial number (such as Dell Service Tag):

wmic bios get serialnumber

There's a trick to getting it to run remotely using PsExec:
  1. Connect to the command prompt as per normal e.g.: psexec \\computername cmd
  2. Enter above command as: cmd | wmic bios get serialnumber
  3. Wait a few seconds for the command to execute, then type exit. It will spit out the result.
Credit to R. Natarajan and finley.

1 comment: