Yes, you can find the serial number of a computer directly using PowerShell, and you do not need to open the physical chassis to do so. This method works on virtually all Windows operating systems, including Windows 10 and Windows 11, and retrieves the data from the system BIOS (UEFI) without needing third-party software. The process relies on a single command that queries the Windows Management Instrumentation (WMI) service for hardware information.

What You'll Need

  • A computer running Windows 10 or Windows 11.
  • Administrative access to the machine (standard user access is usually sufficient for this command).
  • A text editor or the PowerShell console itself to view the output.

Step-by-Step

  1. Open the Start Menu. Click the Windows icon in the bottom-left corner of the screen.
  2. Search for PowerShell. Type "PowerShell" into the search bar. You will see "Windows PowerShell" or "PowerShell" appear in the results list.
  3. Run as Administrator (Recommended). Right-click on the "Windows PowerShell" or "PowerShell” icon that appears in the search results. Select "Run as administrator" from the context menu. This elevates the privileges of the window, which is good practice for system queries, though not strictly mandatory for reading hardware info.
  4. Run the Hardware Inventory Command. In the white command window that opens, type the following command and press Enter:
Get-CimInstance -ClassName Win32_BIOS
  1. Locate the Serial Number. The system will return a list of information about the BIOS, including the Name, Manufacturer, Version, and Release Date. Look for the property labeled SerialNumber. The value next to this label is your computer's unique serial number.
  2. (Optional) Format the Output for Clarity. If the output is too verbose or you only want to see the serial number, you can pipe the command to a specific format. Type the following command and press Enter:
Get-CimInstance -ClassName Win32_BIOS | Select-Object SerialNumber
  1. Copy the Result. The output will display your serial number in plain text. You can highlight this text with your mouse, right-click to copy it, and paste it into a text file, email, or support ticket.

Common Mistakes

When using this method, users often encounter a few specific issues that prevent them from seeing the information they need. Awareness of these common pitfalls can save time and frustration.

One frequent mistake is running the command in a standard Command Prompt instead of PowerShell. While Windows 10 and 11 are compatible, the commands used here are native to the PowerShell environment. Using the standard `cmd.exe` will result in a syntax error because the `Get-CimInstance` and `Select-Object` cmdlets do not exist in the legacy command prompt.

Another common error is failing to look in the right section of the output. The command returns a full inventory of the system's BIOS. Beginners often scan the first few lines of text and give up if they don't see the serial number immediately. It is important to scroll down or look past the Name and Manufacturer fields to find the SerialNumber property.

Users also sometimes expect the serial number to be the same string of text printed on the back of the PC. However, the serial number retrieved here is the internal serial number assigned by the manufacturer. In some cases, the internal serial is blank or a generic code, while the physical label on the device might be a different string. The method described retrieves the internal value, which is the one used for warranty registration and asset tracking.

Tips

There are several ways to refine this process to make it more efficient or easier to read.

If you are running this command on a laptop that is currently closed or docked, or if the screen is locked, you can run the command remotely. You would need to use the `-ComputerName` parameter followed by the target machine's IP address or hostname. For example: `Get-CimInstance -ClassName Win32_BIOS -ComputerName "192.168.1.50" | Select-Object SerialNumber`. This allows IT administrators to query a fleet of computers from a single management station.

For a cleaner output, you can assign the result to a variable and then display it. This is useful if you are scripting the command. You would type `$Serial = Get-CimInstance -ClassName Win32_BIOS | Select-Object SerialNumber` and then simply type `$Serial.SerialNumber` to display the result. This prevents the clutter of other BIOS properties from distracting you.

It is worth noting that this method works for desktops, laptops, and servers. The underlying hardware component being queried is the BIOS, which exists on all these form factors. Whether the device is a high-end workstation or a basic office PC, the command will return the serial number associated with that specific motherboard.

Troubleshooting

If the command runs but returns no serial number, or if it returns a string of zeros or dashes, the issue is usually related to how the computer was manufactured or how the BIOS is configured.

If the command returns a blank result, the computer may not have a serial number burned into the BIOS. This happens with very cheap or custom-built machines where the manufacturer skipped this step, or with older systems that predate the standardization of serial numbers in firmware. In these cases, the serial number may only be printed on the physical case.

If the command returns a string of characters like `Default string` or `To be filled by O.E.M.`, this indicates that the BIOS has not been updated with the correct serial number. This is a common issue with refurbished computers. The best solution in this scenario is to check the physical label on the bottom or back of the device, as the manufacturer may have applied the correct serial number there even if the firmware is empty.

If you receive an Access Denied error when trying to run the command, ensure you are logged in with an account that has administrative rights. While the command itself is read-only, the interaction with the WMI repository sometimes requires elevated privileges, especially on corporate networks with strict Group Policy settings.

Frequently Asked Questions

Does this method work on a virtual machine?

Yes, it works on virtual machines, provided the virtualization software has been properly configured to expose the hardware information to the guest operating system. However, the serial number in a virtual machine is often a randomly generated string assigned by the virtualization platform rather than a physical label.

Will this command work if the computer is turned off?

No, the computer must be powered on and the operating system must be loaded for this command to function. You cannot query the BIOS remotely via PowerShell while the computer is in a powered-off state; that requires physical access or a different set of tools.

Can I use this command on a Mac or Linux computer?

No, this specific command is for Windows only. Macs use the `system_profiler` command in Terminal, and Linux distributions use various commands like `dmidecode` or `sudo dmidecode -s system-serial-number`, which can only be run with root privileges.

Why does the serial number look different from the sticker on the case?

The serial number in the BIOS is the internal identifier for the motherboard, while the sticker on the case is often a label applied by the reseller or the user. Sometimes manufacturers use a generic label for the case and burn a specific serial into the motherboard, or vice versa.

Is the serial number the same as the UUID?

No, they are different identifiers. The serial number is a human-readable or machine-readable string that identifies the physical unit. The UUID (Universally Unique Identifier) is a random hexadecimal code generated by the operating system to uniquely identify the computer on a network.