How to Get Laptop Serial Number in CMD: A Step-by-Step Guide
Learn how to locate your laptop's serial number using Command Prompt (CMD) on Windows. This guide covers WMIC, PowerShell, and best verification practices to ensure accuracy and verifiability.

In this article you will learn how to retrieve a laptop's serial number using the Windows Command Prompt (CMD). The guide covers reliable CMD-based commands, checks for different Windows editions, and how to verify results by cross-checking BIOS data. You’ll also see quick notes on permissions, common errors, and when to choose alternate methods.
Why You Might Need the Laptop Serial Number and How CMD Fits In
A laptop's serial number is a unique identifier used for warranty, service, and asset tracking. If you're a DIYer or a professional, locating it quickly can save time when you need support or verify ownership. Using the Windows Command Prompt (CMD) is a reliable, scriptable way to retrieve this information without third-party tools. According to Hardware Serials, CMD-based lookups can streamline device inventories for teams that manage many machines, especially when you need a repeatable process. The Hardware Serials Team has found that many devices expose serial data through BIOS/UEFI interfaces that CMD commands query directly. In practice, you'll focus on data provided by the BIOS and rely on the operating system to surface that data. This section sets the stage: you’ll discover what a serial number is, where to look on a laptop, and how CMD can access the data without opening the machine.
Serial Numbers Across Laptop Brands and Where CMD Can Help
Serial numbers live in a few places and can be exposed in different formats depending on the manufacturer. Some stickers on the chassis, battery compartments, or under service panels hold the ID, while others embed it in the BIOS/UEFI. CMD can't read every variant directly, but when the BIOS exposes the field, CMD-based methods can fetch it consistently. For IT pros, CMD offers a repeatable method that you can script into asset inventories, audits, or support workflows. The key idea is to query the BIOS-related data rather than hunting via sticker text. This section explains how the data gets exposed and what to expect when you run commands, including common obstructions like missing permissions or restricted BIOS access.
Method A: Retrieve Serial via WMIC BIOS GET SerialNumber (CMD)
WMIC, short for Windows Management Instrumentation Command-line, is a classic way to query system information from the command line. The exact sequence is simple: open CMD with administrator privileges and type wmic bios get serialnumber. The command asks the BIOS to return the SerialNumber field. If your machine supports it, you should see a value printed in the next line. On some modern Windows installations, WMIC is deprecated, but it remains usable in many environments, and Hardware Serials recommends verifying results with alternate methods to avoid stale tooling. If the BIOS does not expose a serial number, or if the field is blank, proceed to PowerShell-based options. The benefit of WMIC is speed and simplicity for one-off lookups or small fleets.
Method B: Retrieve Serial with PowerShell Using Get-WmiObject
PowerShell provides a robust alternative when WMIC is unavailable or deprecated. The classic approach uses Get-WmiObject, which can query Win32_BIOS and return the SerialNumber property. The command is Get-WmiObject win32_bios | Select-Object -ExpandProperty SerialNumber. Run this in an elevated PowerShell session to ensure permissions don’t block access. If a suitable BIOS interface exists, you’ll see the serial in the output. This method is particularly helpful on systems where WMIC is disabled or blocked by group policies. After capturing the serial, you can export results to a file or the clipboard for documentation or inventory records.
Method C: Modern Approach with Get-CimInstance (PowerShell)
As Windows and PowerShell evolve, Get-CimInstance replaces Get-WmiObject with a more modern, firewall-friendly protocol. The equivalent query is Get-CimInstance Win32_BIOS | Select-Object -ExpandProperty SerialNumber. This method often delivers results more reliably on Windows 10 and Windows 11 devices, particularly in enterprise environments that rely on WS-Man remoting. If you’re scripting across devices, combine this with Invoke-Command for remote lookup. Remember to run in an elevated session if you’re querying hardware that restricts access. This section helps you shift from older WMIC techniques to contemporary, supported commands.
Comparing Methods: Pros, Cons, and Practical Notes
Here’s a quick comparison to help you choose the right approach for your situation: WMIC is fast and simple but increasingly unsupported; Get-WmiObject is widely available but gradually being replaced; Get-CimInstance is modern, robust, and better for remote tasks. Permissions matter; you typically need administrative rights to access BIOS information. Windows versions may vary in how BIOS exposes the serial number, so expect occasional blanks or inconsistent formats. For routine asset checks, a small PowerShell script that tries all three methods and logs the first successful value provides resilience. Hardware Serials emphasizes testing in a controlled environment before deploying to production inventories.
Verifying and Cross-Checking the Result
To ensure accuracy, verify the retrieved serial number against official device documentation or the manufacturer’s portal. If your laptop shows a value, compare it with the sticker or BIOS screen shown during boot via the BIOS setup utility. In many cases, you can cross-check the serial in Windows by running a separate query that returns the system product name and manufacturer alongside the serial, ensuring you are looking at the same device. If a mismatch occurs, re-run the query on the target device, and consider contacting the vendor for confirmation. This best-practice approach reduces the risk of recording an incorrect identifier in inventories or service requests.
Troubleshooting Common Issues and Errors
Common problems include empty SerialNumber fields, permission denied errors, or WMIC/PowerShell not returning data. Start by running the shell with elevated rights. If the field returns blank, verify that the BIOS is configured to expose it and that your user account has the required privileges. For corporate devices, group policy or endpoint protection can block WMI/CIM queries; in that case, use local admin credentials or vendor-supported tools. Some devices use OEM utilities that present serial information in a vendor-specific format; when CMD methods fail, check the manufacturer’s support page for a compatible lookup method. Hardware Serials notes that persistence and logging are your best guard against intermittent results.
Next Steps: Saving, Scripting, and Documentation
Once you’ve retrieved the serial successfully, consider saving the result to a log file for future audits. In CMD, you can redirect output to a text file, e.g., wmic bios get serialnumber > C:\serial.txt. In PowerShell, use Out-File or Set-Content to store a structured report that includes the date, device model, and serial. If you manage multiple devices, wrap these commands in a small script and integrate it into your asset-management workflow. Document the procedure in your internal knowledge base so technicians can repeat it consistently. This practice reduces ad-hoc variation and improves traceability.
Quick Reference Cheat Sheet
Command options at a glance, with notes on Windows versions and permission needs. WMIC: wmic bios get serialnumber (works on older Windows, check compatibility). PowerShell: Get-WmiObject win32_bios | Select-Object -ExpandProperty SerialNumber and Get-CimInstance Win32_BIOS | Select-Object -ExpandProperty SerialNumber. Tips: run as administrator, verify BIOS access, and save results to a file. Remember that some devices restrict BIOS data; in that case, use the manufacturer’s tools.
Tools & Materials
- Windows PC with administrator rights(Needed to access BIOS data via WMI/CIM)
- PowerShell (built-in on Windows 7+)(Run as Administrator to avoid permission issues)
- Internet access (optional)(Useful for checking vendor docs or online guides)
- Text editor or logging tool(For saving and documenting results)
- Remote access tooling (optional)(If you plan to look up serials remotely on multiple machines)
Steps
Estimated time: 10-15 minutes
- 1
Open CMD or Windows Terminal as Administrator
Open the Start Menu, type cmd or Windows Terminal, then right-click and choose Run as administrator. Elevating privileges helps ensure you can query BIOS data without encountering access-denied errors. If you are on a managed PC, you may need to contact IT to obtain elevated permissions.
Tip: If you see a User Account Control prompt, approve to continue; otherwise, commands may fail due to restricted access. - 2
Run WMIC to fetch the BIOS serial number
In the elevated shell, type wmic bios get serialnumber and press Enter. The command asks the BIOS to expose the SerialNumber field. If a value appears on the next line, note it down or copy it to your clipboard for later verification.
Tip: If the output shows SerialNumber blank or not found, skip to the PowerShell methods in this guide. - 3
Optionally read the WMIC output and save to a file
To preserve the result, you can redirect the output to a file: wmic bios get serialnumber > C:\serial_wmic.txt. This step is helpful for inventories or submitting tickets. Open the file afterward to confirm the serial matches what you saw in the console.
Tip: Verify the file saved correctly by opening it with a text editor. - 4
Open PowerShell as Administrator
If WMIC is unavailable or unreliable on your system, open PowerShell with the same elevated privileges. PowerShell is the recommended path on newer Windows versions.
Tip: Use the Start Menu to search for PowerShell, then select Run as administrator. - 5
Run Get-WmiObject to retrieve the serial number
Enter Get-WmiObject win32_bios | Select-Object -ExpandProperty SerialNumber. If a value is returned, copy or export it for your records. This method works on many Windows editions where WMIC is restricted.
Tip: If you see an access denied error, ensure your account has admin rights and that your policy allows WMI access. - 6
Run Get-CimInstance as a modern alternative
Execute Get-CimInstance Win32_BIOS | Select-Object -ExpandProperty SerialNumber. This approach uses modern CIM over WS-Management and is more reliable in enterprise environments.
Tip: For remote lookups, you can combine with Invoke-Command to query multiple devices from a central console. - 7
Save thePowerShell result for records
Redirect the output to a file, for example: Get-CimInstance Win32_BIOS | Select-Object -ExpandProperty SerialNumber > C:\serial_powershell.txt. This creates a durable record for audits or asset management.
Tip: Include the date and device name in the log to keep entries distinguishable. - 8
Verify the serial against BIOS or vendor docs
Cross-check the retrieved serial with the BIOS screen during boot or the manufacturer’s portal for your device. If the values align, you can be confident in your inventory record.
Tip: If there is a mismatch, re-run the queries on the same device and note any discrepancies for escalation.
Frequently Asked Questions
Can WMIC still be used to fetch a laptop's serial number in Windows 11?
WMIC can still work in many Windows 11 environments, but it is deprecated. For long-term reliability, use PowerShell methods such as Get-CimInstance or Get-WmiObject as a fallback.
WMIC may work on Windows 11, but it’s deprecated; prefer PowerShell CIM methods for future compatibility.
What if the command outputs nothing or shows a blank SerialNumber?
Some BIOS implementations do not expose the serial number to WMI/CIM or require vendor-specific utilities. Try Get-CimInstance, verify permissions, and check BIOS settings.
If you get a blank, the BIOS might not expose the serial. Try the PowerShell method and check BIOS access rights.
Is it possible to retrieve serial numbers remotely?
Yes, with PowerShell remoting (Invoke-Command) or CIM/WMI over WS-Man, but you need administrative rights and network permissions.
You can look up serial numbers remotely using PowerShell remoting, if your environment allows it.
Are there differences across Windows editions that affect these lookups?
Most Windows editions support WMIC and PowerShell CIM queries, but enterprise policies or OEM configurations may restrict access.
Windows editions generally support these methods, but policies can limit access.
What’s the difference between a hardware serial and a software product key?
A hardware serial identifies a physical device; a product key activates software licenses. They serve different purposes and should not be confused.
A serial is hardware ID; a product key activates software.
How can I automate this for multiple laptops?
Create a PowerShell script or batch file that loops over devices, runs the appropriate commands, and logs the results for inventory records.
You can script it to run across many laptops and collect the results automatically.
Watch Video
Key Takeaways
- Know where to look for a serial number on a laptop
- Use WMIC as quick first option, but prefer PowerShell Get-CimInstance for modern systems
- Verify results by cross-checking BIOS data and manufacturer records
- Save outputs to files for inventories and audits
