WMIC Get Serial Number: Command & Examples
- Average speed
- km/h
- Result
- Finish time
- 50 min
- You entered
- Distance
- 10 km
- You entered
The quickest way to get a PC’s serial number is to open Command Prompt and run wmic bios get serialnumber. This returns the manufacturer-assigned serial number (often called Service Tag or S/N) in a few seconds. Below is the full command syntax, how to read the output, what to do when it shows “To be filled by O.E.M.”, and how to save the result to a file.
Formula
The WMIC command doesn’t use a mathematical formula; it’s a WMI (Windows Management Instrumentation) query. The syntax is:
wmic [alias] [path] [get] [property]
- wmic – the command-line tool that exposes WMI data.
- bios – the WMI class that holds BIOS information (including the serial number).
- get serialnumber – requests only the
SerialNumberproperty.
The full command is wmic bios get serialnumber. You can also use wmic csproduct get identifyingnumber (the “IdentifyingNumber” is the same serial in most systems).
Worked Example
Open Command Prompt (Win + R, type cmd, press Enter). Type:
wmic bios get serialnumber
Press Enter. The output looks like:
SerialNumber ABC1234567
Here, ABC1234567 is the machine’s serial number. If you want just the number without the header, use:
wmic bios get serialnumber /value
That prints:
SerialNumber=ABC1234567
When to Use WMIC for Serial Number
Use this command when you need the hardware serial number for warranty claims, asset tracking, or inventory. It works on Windows 7 through Windows 10, but note that WMIC is deprecated in Windows 11 (it’s still available in most builds, but Microsoft recommends using PowerShell). If you’re on Windows 11, you can use the PowerShell equivalent: Get-CimInstance -ClassName Win32_BIOS | Select-Object -ExpandProperty SerialNumber.
This command is especially handy when you can’t physically access the sticker on the laptop or desktop, or when the sticker has worn off.
Common Problems and Misconceptions
- “To be filled by O.E.M.” – This means the motherboard manufacturer didn’t program a serial number into the BIOS. It’s common on custom-built desktops. The serial number of the whole PC isn’t stored, so you’ll need to check the case sticker or the individual component serials (e.g., motherboard, hard drive).
- “SerialNumber” vs “Service Tag” – On Dell, HP, Lenovo, etc., the serial number is often called a Service Tag or Product ID, but WMIC returns the same value.
- Command not recognized – If you get “’wmic’ is not recognized”, you’re likely on an older Windows (XP) or a stripped-down edition. Use PowerShell instead.
- Access denied – Running WMIC as a standard user may fail. Right-click Command Prompt and select “Run as administrator”.
How to Save the Serial Number to a File
To export the result to a text file for records, use the redirection operator:
wmic bios get serialnumber > serial.txt
This creates a file named serial.txt in the current directory. To see the full path, type cd to show the current directory. You can also use wmic bios get serialnumber /format:list > serial.txt to get a cleaner output.
Alternatives to WMIC
- PowerShell:
Get-CimInstance Win32_BIOS | Select SerialNumber– works on all modern Windows. - System Information (msinfo32): Run
msinfo32, look under “System Summary” → “System Model” or “BaseBoard Serial Number” (not always present). - Command Prompt with different WMI class:
wmic csproduct get name, identifyingnumbergives both model and serial. - Third-party tools: CPU-Z, Speccy, or Belarc Advisor can show serial numbers, but they’re not necessary for a single machine.
Frequently Asked Questions
Why does wmic bios get serialnumber return “To be filled by O.E.M.”?
This happens when the motherboard manufacturer didn’t write a serial number into the BIOS. It’s common on custom-built PCs. The serial number of the entire system isn’t stored in a standard location, so you’ll have to look for a sticker on the case or use the serial of a component like the motherboard (which can be found with wmic baseboard get serialnumber).
Can I get the serial number without using Command Prompt?
Yes. You can use PowerShell with Get-CimInstance Win32_BIOS | Select SerialNumber, or open System Information (msinfo32) and look under System Summary. Some manufacturers also provide the serial number in the BIOS/UEFI setup screen.
Does wmic work on Windows 11?
WMIC is deprecated in Windows 11, but it’s still present in most builds as of 2024. If it’s missing, use PowerShell instead. The command Get-CimInstance Win32_BIOS | Select SerialNumber works identically.
What if I get “Invalid query” when running wmic bios get serialnumber?
This usually means you mistyped the command. Ensure there’s a space between “bios” and “get”. Also, check that you’re using a standard command prompt, not PowerShell (though PowerShell can run wmic too). If the issue persists, try wmic csproduct get identifyingnumber.
Is the serial number the same as the Windows product key?
No. The serial number is a hardware identifier assigned by the manufacturer (e.g., Dell, HP). The Windows product key is a software license key. They are completely different and unrelated.
How do I find the serial number on a Mac?
This article is about Windows. On a Mac, click the Apple menu → About This Mac, and the serial number is shown there. You can also run system_profiler SPHardwareDataType in Terminal to see it.
Related
Formula used
in t | Finish time | min | 50 | 0 in d | Distance | km | 10 | 0 out pace | Average pace | min/km | t / d | 2 out speed | Average speed | km/h | d / (t / 60) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.