Need your PC’s serial number for activation, warranty checks, or hardware identification? PowerShell makes it easy to pull this key from your system’s registry or system information—no need for third-party tools or manual searches. Here’s how to find it accurately and reliably.
What You'll Need
- A Windows PC (Windows 7 or newer)—PowerShell is built into all modern Windows versions. No additional software is required.
- Administrator privileges may be needed on some systems for certain registry checks.
Step-by-Step
-
Open PowerShell as Administrator
Press
Win + Xon Windows, then select "Windows Terminal (Admin)" or "PowerShell (Admin)" from the menu. This gives you full access to registry and system details. If prompted by UAC, click "Yes." -
Use the WMI Command to Retrieve the System's Serial Number
Run this command in PowerShell, and it will display the system serial number in the output:
Get-WmiObject -Class Win32_BaseBoard | Select-Object SerialNumberThis method works on Windows 7 through Windows 11. If it fails, proceed to the next step. -
Check the Registry Directly (Alternative Method)
If the WMI method doesn’t work, use this registry query:
reg query "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS" /v SerialNumberPressEnterto execute. If the serial number appears under "Value data," copy it and save it for your records. -
Verify via System Information (GUI Method)
If PowerShell still fails, open the built-in "System Information" tool:
- Press
Win + Pause/Breakto open "System Information." - Go to System Summary in the left pane.
- Look for "System Manufacturer" and "System Serial Number" in the details. While not the exact hardware serial, it often matches or is close to the one needed for software activation.
- Press
Common Mistakes
- Using non-admin PowerShell Running PowerShell without elevation can block access to registry keys. Always open it as Administrator first.
- Misinterpreting the output The WMI command returns the system board serial number, not the exact hardware ID for all devices (like GPUs or SSDs). If you need a specific device’s serial (e.g., SSD), those are often in BIOS settings or manufacturer tools like CrystalDiskInfo.
- Ignoring case sensitivity Registry queries are case-sensitive. If the output fails, ensure you’re querying the exact key path (e.g., "BIOS" vs. "bios").
Tips
- Save the serial number immediately Copy the result to a text file or clipboard right after getting it to avoid losing it later.
- Check multiple sources If one method fails, try the next. For example, if WMI doesn’t work, the registry path often does.
- Use for warranty or software activation Most hardware manufacturers accept either the system board serial or the BIOS serial for warranties. For software (e.g., Windows or drivers), the exact model number from the WMI query usually suffices.
- Reset PowerShell if stuck If commands hang or fail, close PowerShell, restart your PC, then reopen it as Administrator.
Troubleshooting
-
Error: "Access Denied"
Restart your PC, then open PowerShell as Administrator again. If that doesn’t work, manually run this command to unlock the registry:
icacls "HKLM:\HARDWARE\DESCRIPTION\System\BIOS" /grant Administrators:(OI)(CI)FRun this as an admin and wait for confirmation. Then retry the registry query. - Command returns no output Try the GUI System Information method (Step 3). If that fails, the serial may be stored in a different location (e.g., UEFI settings or a hidden file in the system partition).
- Still no luck? For legacy systems (pre-Windows 7), open the BIOS/UEFI firmware during boot and look for a serial number under "System Information" or "Basic Information." This is the most reliable method for older PCs.
Frequently Asked Questions
How do I find the serial number for a specific device (e.g., SSD or GPU)?
Use manufacturer tools like CrystalDiskInfo for SSDs or NVIDIA GeForce Experience/AMD Adrenalin for GPUs. These tools display the exact serial numbers for each device without requiring PowerShell.
Why does my PowerShell command sometimes give a different serial number than the physical one?
The WMI query returns the system board’s serial number, which ties to the motherboard. Individual components (like SSDs or GPUs) may have separate serial numbers stored in their firmware or manufacturer tools.
Can I use this PowerShell method on a virtual machine?
Yes, but the output will differ. VMs often use synthetic serial numbers for security and licensing. For real hardware, use the host machine’s physical serial number.
What if I don’t have admin rights?
You’ll need to run PowerShell as Administrator or ask an admin to execute the commands. Without access, you may only check the System Information GUI method.
Does this method work on Windows Server?
The same commands apply, but some registry paths may vary slightly by server edition. Test in a non-production environment first.
How can I export the serial number to a file?
Run this command to save the output to a text file:
Get-WmiObject -Class Win32_BaseBoard | Select-Object SerialNumber | Out-File -FilePath "C:\SerialNumber.txt"
This will create a file named "SerialNumber.txt" in your user directory.