Skip to content

!!IMPORTANT!! Discord server termed, join the new one! discord.gg/QNkCQDWtGD

Sense

USB Serial Number: How to Find It in Windows

How to find USB device serial numbers in Windows using Device Manager, PowerShell, and WMIC. Learn what anti-cheats read and why USB serials matter for HWID.

By SensePublished

USB Serial Number: How to Find It in Windows

Every USB device connected to your Windows PC carries identifying information, including a serial number that is unique to that specific unit. Whether you are troubleshooting hardware issues, inventorying your devices, or understanding what data anti-cheat systems can access, knowing how to find USB serial numbers is a useful skill. This guide covers every method available in Windows, from graphical tools to command-line approaches.

What Is a USB Serial Number?

A USB serial number is a string of characters assigned to a USB device by its manufacturer. It is stored in the device's firmware and is transmitted to the host computer as part of the USB enumeration process when the device is plugged in.

The serial number is part of the USB device descriptor, which is a data structure that the device sends to the operating system during the initial handshake. The descriptor includes the vendor ID (VID), product ID (PID), device class, and optionally a serial number string.

Not every USB device has a unique serial number. The USB specification makes the serial number field optional. Cheap peripherals, generic flash drives, and budget accessories often share the same serial number across all units of the same model, or they may not report a serial number at all. Higher-quality devices, enterprise equipment, and storage devices almost always have unique serial numbers.

When a serial number is present, Windows uses it along with the VID and PID to create a unique instance ID for the device. This instance ID is what the operating system uses to distinguish between two identical devices from the same manufacturer.

Why USB Serial Numbers Matter

USB serial numbers serve several practical purposes.

Device Identification

When you plug in two identical USB drives, Windows needs to tell them apart. The serial number is how it does this. Each drive gets its own drive letter assignment, its own device-specific settings, and its own entry in the device registry.

Software Licensing

Some software uses USB dongles for license enforcement. The software checks for a specific USB device with a specific serial number. Without the correct dongle, the software will not run. The serial number ensures that only the authorized dongle works.

Security and Compliance

In enterprise environments, USB serial numbers are used to track which devices have been connected to which computers. Data loss prevention (DLP) software can whitelist specific USB devices by serial number and block all others. This prevents employees from using unauthorized storage devices.

Anti-Cheat and Hardware Fingerprinting

This is where USB serial numbers become relevant for gamers. Kernel-level anti-cheat systems have the ability to enumerate USB devices and read their identifying information, including serial numbers. While USB serial numbers are rarely the primary identifier used for hardware bans, they can be part of the broader hardware fingerprint that anti-cheat systems compile.

The logic is straightforward. If a banned player changes their disk serial number, motherboard UUID, and MAC address but leaves the same unique USB devices connected, those USB identifiers could potentially help the anti-cheat re-identify the hardware. In practice, most anti-cheats focus on more stable identifiers like disk serials and motherboard information, but USB data can serve as supplementary evidence.

Method 1: Device Manager

Device Manager is the most accessible way to view USB device information, though it requires a few clicks to reach the serial number.

Steps

  1. Press Windows + X and select Device Manager, or search for "Device Manager" in the Start menu.
  2. Expand the "Universal Serial Bus controllers" section.
  3. Right-click on the USB device you want to inspect and select Properties.
  4. Go to the Details tab.
  5. In the Property dropdown, select "Device instance path" or "Hardware Ids."

The device instance path will look something like: USB\VID_0781&PID_5583\20060413092100000

In this example, VID_0781 is the vendor ID (SanDisk), PID_5583 is the product ID, and 20060413092100000 is the serial number.

If the last segment after the second backslash contains only numbers and letters and looks unique, that is the device's serial number. If it looks like a system-generated string with ampersands (like 5&2dda1e0&0&1), the device does not have a manufacturer-assigned serial number, and Windows generated an instance ID instead.

You can also look for USB storage devices under "Disk drives" in Device Manager. The same Properties > Details > Device instance path approach works there as well.

Method 2: PowerShell

PowerShell provides more detailed and scriptable access to USB device information.

List All USB Devices with Serial Numbers

Open PowerShell (press Windows + X, then select Windows PowerShell) and run:

Get-PnpDevice -Class USB | Select-Object Status, Class, FriendlyName, InstanceId

This lists all USB devices with their instance IDs. The serial number is typically the last portion of the InstanceId after the second backslash.

Get Detailed USB Storage Information

For USB storage devices specifically, this command provides more useful output:

Get-WmiObject Win32_DiskDrive | Where-Object { $_.InterfaceType -eq 'USB' } | Select-Object Model, SerialNumber, InterfaceType

This directly shows the serial number of USB drives in a clean format.

Enumerate All USB Device Descriptors

For a comprehensive dump of USB device information:

Get-WmiObject Win32_USBControllerDevice | ForEach-Object { [wmi]($_.Dependent) } | Select-Object Name, DeviceID, Status

The DeviceID field contains the VID, PID, and serial number in the format described above.

Filter for Specific Devices

If you know the vendor ID or product ID of the device you are looking for:

Get-PnpDevice | Where-Object { $_.InstanceId -like '*VID_0781*' } | Select-Object FriendlyName, InstanceId

Replace VID_0781 with your device's vendor ID.

Method 3: WMIC (Windows Management Instrumentation Command)

WMIC is an older command-line tool that is still available in Windows, though Microsoft has deprecated it in favor of PowerShell. It remains useful for quick lookups.

List USB Disk Drives

Open Command Prompt and run:

wmic diskdrive where InterfaceType='USB' get Model,SerialNumber

This outputs a clean table of USB storage devices and their serial numbers.

List All PnP Entities with USB in the Device ID

wmic path Win32_PnPEntity where "DeviceID like '%USB%'" get Name,DeviceID

This returns all Plug and Play entities that have "USB" in their device ID, which includes controllers, hubs, and connected devices.

Note that WMIC output formatting can be inconsistent, with long lines wrapping awkwardly. Piping to a file (> output.txt) and opening it in a text editor often produces more readable results.

Method 4: Registry Editor

Windows stores historical USB device connection data in the registry. This method shows not just currently connected devices but every USB device that has ever been connected to your PC.

Steps

  1. Press Windows + R, type regedit, and press Enter.
  2. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB
  3. Each subfolder represents a VID/PID combination. Expand any folder to see the serial numbers of devices with that VID/PID that have been connected.
  4. For USB storage devices specifically, check: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR

The USBSTOR key organizes devices by type and model, with each connected device's serial number appearing as a subfolder name.

This registry path is particularly relevant for security and forensics, as it provides a historical record of every USB storage device that has been connected to the machine, along with timestamps indicating when the device was first and last connected.

Method 5: USBDeview (Third-Party Tool)

For a more user-friendly approach, NirSoft's USBDeview is a free portable utility that displays comprehensive information about every USB device that has been connected to your PC.

USBDeview shows the device name, description, device type, serial number, VID, PID, first and last connection dates, and more. It can export data to HTML, CSV, or XML for documentation purposes.

The tool is portable, meaning it does not require installation. Download it, run the executable, and it immediately displays the full USB device history.

Understanding What Anti-Cheats See

Kernel-level anti-cheat systems have access to the same information as the methods described above, plus potentially more. Running at Ring 0, they can directly query USB device descriptors without going through the Windows API, which makes their reads harder to intercept.

The information available includes vendor IDs, product IDs, serial numbers, device class, device descriptors, and connection topology (which ports devices are connected to). An anti-cheat could theoretically build a profile of your connected USB devices and include that in your hardware fingerprint.

In practice, USB serial numbers are a minor component of hardware fingerprinting. Anti-cheats prioritize more stable identifiers like disk serials, motherboard UUIDs, MAC addresses, and BIOS information. USB devices are portable and frequently change, so they are less reliable as persistent identifiers. However, they can serve as supplementary data points, especially for unusual or distinctive peripherals that remain connected consistently.

Changing or Spoofing USB Serial Numbers

Unlike some other hardware identifiers, USB serial numbers are burned into the device firmware at the factory. You cannot change them through Windows settings or standard software tools.

Some specialized firmware flashing tools exist for certain USB controllers that can modify the device descriptor, including the serial number. However, these tools are device-specific, can permanently damage the device if used incorrectly, and are generally not practical for most users.

A more practical approach for anyone concerned about USB serial numbers as part of a hardware fingerprint is to use an HWID spoofer. Comprehensive spoofers like Sense AC intercept hardware queries at the driver level, returning modified identifiers for all hardware components, including USB devices. This avoids the need to physically modify or replace devices.

USB Serial Numbers and Privacy

Beyond gaming, USB serial numbers have privacy implications. Every time you plug a USB device into a computer, the serial number is logged. In corporate environments, this data is used for security auditing. In forensic investigations, USB connection history can establish that a specific device was connected to a specific computer at a specific time.

If privacy is a concern, be aware that your USB devices leave a trail on every computer they touch. The registry entries described in Method 4 persist even after the device is removed. Clearing this history requires manually deleting registry keys or using specialized cleanup tools.

Summary of Commands

Here is a quick reference for the most useful commands:

MethodCommandWhat It Shows
PowerShellGet-PnpDevice -Class USB | Select InstanceIdAll USB device instance IDs
PowerShellGet-WmiObject Win32_DiskDrive | Where InterfaceType -eq USBUSB drive serial numbers
WMICwmic diskdrive where InterfaceType='USB' get SerialNumberUSB drive serial numbers
RegistryHKLM\SYSTEM\CurrentControlSet\Enum\USBSTORHistorical USB storage devices

Conclusion

USB serial numbers are unique identifiers assigned by device manufacturers that Windows uses to distinguish between identical devices. You can find them through Device Manager, PowerShell, WMIC, or the Windows registry. While they play a minor role in anti-cheat hardware fingerprinting compared to disk and motherboard identifiers, they are part of the broader set of data points that kernel-level systems like Denuvo, BattlEye, and EAC can access. For a complete hardware identity reset that includes USB identifiers, Sense AC's spoofer handles all hardware fingerprint components in one tool.