Last updated:

Quick answer: open PowerShell and run Get-CimInstance -ClassName Win32_BIOS | Select-Object -ExpandProperty SerialNumber. It prints the serial number stored in the BIOS/UEFI firmware and works in Windows PowerShell 5.1 and PowerShell 7 on Windows 10 and Windows 11. The older wmic bios get serialnumber command no longer works on current Windows 11 releases, because Microsoft has removed WMIC.

The serial number Windows reads from the firmware is the same one printed on the sticker of most laptops and branded desktops (Dell, HP, Lenovo and so on). You need it for warranty checks, support tickets and asset inventories. This guide shows the command to use today, the older commands you will still find in scripts and other tutorials, how to query a remote PC, and what to do when the result is blank or says “To be filled by O.E.M.”. To label machines by name as well, the hostname command in Windows returns the computer name.

Which command should you use?

Command Works in Status
Get-CimInstance -ClassName Win32_BIOS Windows PowerShell 5.1 and PowerShell 7 Recommended. Supported by Microsoft.
Get-WmiObject -Class Win32_BIOS Windows PowerShell 5.1 only Superseded by Get-CimInstance since PowerShell 3.0. Not available in PowerShell 7.
wmic bios get serialnumber Command Prompt and PowerShell, only where WMIC still exists Deprecated since Windows 10 21H1. Microsoft states (August 2026 update) that WMIC is removed and no longer available as a Feature on Demand on Windows 11 24H2 and later.

All three read the same WMI class (Win32_BIOS), so they return the same value on a given PC. Only the tool around it differs. Removing WMIC does not affect WMI itself, which is why the PowerShell cmdlets keep working.

Advertisement

Get the serial number with Get-CimInstance (recommended)

Open PowerShell from the Start menu. Administrator rights are not needed to read the local BIOS serial number, but an elevated window does no harm:

Windows Start menu search for powershell with Run as Administrator selected for Windows PowerShell
Opening Windows PowerShell from the Start menu (screenshot from Windows 10).

Run either of these commands. The first prints only the value, which is handy in scripts; the second prints it with a label:

Get-CimInstance -ClassName Win32_BIOS | Select-Object -ExpandProperty SerialNumber
(Get-CimInstance -ClassName Win32_BIOS).SerialNumber

To save it to a file, for example for an inventory list:

(Get-CimInstance -ClassName Win32_BIOS).SerialNumber | Out-File -FilePath C:\SerialNumber.txt
Get-Content C:\SerialNumber.txt

Older method: wmic bios get serialnumber

Many older guides and batch scripts use WMIC. It still works on Windows 10 and on older Windows 11 builds where WMIC is installed, as the screenshots below show, but on Windows 11 24H2 and later you should expect 'wmic' is not recognized as an internal or external command. Replace it with the Get-CimInstance command above.

wmic bios get Serialnumber
PowerShell running wmic bios get Serialnumber and printing the BIOS serial number
wmic output on Windows 10. On Windows 11 24H2 and later, this command is no longer available.

Saving the WMIC output to a text file and reading it back looked like this:

wmic bios get SerialNumber > C:\SerialNumber.txt
PowerShell running wmic bios get SerialNumber with output redirected to C:\SerialNumber.txt
Redirecting the wmic output to a text file.

Get-Content reads the file back. The cat command in Windows guide covers the other ways to print a file in CMD and PowerShell:

Get-Content C:\SerialNumber.txt
Get-Content C:\SerialNumber.txt showing the saved serial number in PowerShell
The saved file contains the same serial number.

Show the serial number with a label (Format-List)

On Windows 10 you can also open PowerShell from the Win + X menu. Then run:

Get-CimInstance Win32_BIOS | Format-List SerialNumber
Windows 10 Win+X menu with Windows PowerShell (Admin) highlighted
The Win + X menu on Windows 10. On Windows 11 the same menu shows Terminal (Admin) instead.
Get-CimInstance Win32_BIOS | Format-List SerialNumber output in Windows PowerShell
Get-CimInstance returns the same serial number as WMIC.

Note: earlier versions of this article showed this command with a stray question mark in front (?Get-CimInstance). The question mark is an alias for Where-Object in PowerShell and breaks the command, so copy the version above.

Advertisement

Get-WmiObject (Windows PowerShell 5.1 only)

You can also start PowerShell from the Run dialog (Win + R, type powershell, then press Ctrl + Shift + Enter for an elevated window):

Run dialog with powershell typed in the Open box
Starting PowerShell from the Run dialog.
Get-WmiObject -Class Win32_BIOS | Select-Object -Property SerialNumber
Get-WmiObject -Class Win32_BIOS | Select-Object -Property SerialNumber output in Windows PowerShell 5.1
Get-WmiObject output in Windows PowerShell 5.1.

Get-WmiObject exists only in Windows PowerShell 5.1. In PowerShell 7 (pwsh) it fails with “The term ‘Get-WmiObject’ is not recognized”. Use Get-CimInstance in new scripts.

Stuck at this step? Ask us, it is free and include the exact error.

Get the serial number from Command Prompt

Open Command Prompt from the Start menu:

Windows Start menu search for command prompt with Run as administrator selected
Opening Command Prompt from the Start menu.

On PCs that still have WMIC, wmic bios get serialnumber works in CMD too. On Windows 11 24H2 and later, call PowerShell from CMD instead. This works in any Command Prompt window or batch file:

powershell -NoProfile -Command "(Get-CimInstance -ClassName Win32_BIOS).SerialNumber"
Get-CimInstance Win32_BIOS | Format-List SerialNumber showing the same BIOS serial number in PowerShell
The same Win32_BIOS serial number, read with Get-CimInstance in PowerShell.

Get the serial number of a remote computer

Get-CimInstance can query another PC on your network if PowerShell remoting (WinRM) is enabled on it and your account is an administrator there:

Get-CimInstance -ClassName Win32_BIOS -ComputerName PC01, PC02 |
    Select-Object PSComputerName, SerialNumber

If WinRM is not enabled on the target, a DCOM session usually works on a domain network:

$opt = New-CimSessionOption -Protocol Dcom
$s = New-CimSession -ComputerName PC01 -SessionOption $opt
Get-CimInstance -CimSession $s -ClassName Win32_BIOS | Select-Object PSComputerName, SerialNumber
Remove-CimSession $s

Motherboard and chassis serial numbers

Win32_BIOS gives the system serial number used for warranty lookups. Other parts have their own serial numbers:

What you need Command
System (warranty) serial (Get-CimInstance Win32_BIOS).SerialNumber
Motherboard serial Get-CimInstance Win32_BaseBoard | Select-Object Manufacturer, Product, SerialNumber
Chassis/enclosure serial (Get-CimInstance Win32_SystemEnclosure).SerialNumber
Manufacturer and model Get-CimInstance Win32_ComputerSystem | Select-Object Manufacturer, Model
Disk serial numbers Get-CimInstance Win32_DiskDrive | Select-Object Model, SerialNumber

For a full overview of the PC (OS version, install date, RAM, BIOS version) in one command, use the systeminfo command in Windows.

Troubleshooting

Result or error What it means What to do
'wmic' is not recognized as an internal or external command WMIC is not installed (removed on Windows 11 24H2 and later). Use Get-CimInstance, or the powershell -Command line above from CMD.
The term 'Get-WmiObject' is not recognized You are in PowerShell 7, where Get-WmiObject does not exist. Use Get-CimInstance.
Empty value, “To be filled by O.E.M.”, “Default string” or “System Serial Number” The manufacturer did not write a serial number into the firmware. This is common on self-built PCs and some motherboards. Check the sticker or the box. For the board itself, try Win32_BaseBoard. On a virtual machine the value comes from the hypervisor.
“Access is denied” or “WinRM cannot complete the operation” on a remote PC No admin rights on the target, WinRM not enabled, or a firewall blocks it. Run as an account that is admin on the target, enable remoting there (Enable-PSRemoting), or use a DCOM session.
Serial number changed after a motherboard replacement The value is stored in firmware on the board. Ask the repair shop or manufacturer to write the original serial back, if warranty records depend on it.

FAQ

Do I need administrator rights?

Not for reading the serial number on the local PC. You need admin rights on the target computer for remote queries.

Can I see the serial number in Windows Settings?

Windows Settings does not show it on most PCs. Some manufacturers show it in their own support app (for example Lenovo Vantage or the HP Support Assistant) and in the BIOS/UEFI setup screen.

Is the serial number the same as the Windows product key?

No. The serial number identifies the hardware. The product key or digital license is for Windows activation.

Commands checked against Microsoft documentation for Get-CimInstance, Get-WmiObject and the WMIC removal notice (November 2026). The screenshots are from the original version of this article on Windows 10.

Advertisement