How to retrieve serial number in Windows
Published: May 15, 2025
Last updated: May 15, 2025
Introduction
This is a quick tutorial on how to retrieve your computer's serial number in Windows using Command Prompt (CMD) or PowerShell (PS).
CMD
To retrieve a serial number in CMD we'll be using the Windows Management Instrumentation Command (WMIC).
The command is:
wmic bios get serialnumber
Example:

Please note, WMIC has been deprecated. You can learn more about that by reading this Microsoft
blog post.

You can also re-install WMIC by following this Mircosoft
tutorial.
PS
To retrieve a serial number in PS we'll be using the Windows Management Instrumentation (WMI) command. Windows PowerShell for WMI supersedes WMIC.
The command is:
Get-WmiObject -Class Win32_Bios | Select SerialNumber
Example:
References: