How to Find a USB Drive's Hardware ID and Instance ID in Windows
A policy can only allow a drive it can name, and Windows names a drive in three different ways. This page shows where each name lives in Device Manager and on the command line, and which one to use.
To find a USB drive's IDs in Windows, plug it in, open Device Manager, switch to View, Devices by connection, open the drive's Properties and use the Details tab to read Hardware Ids and Device instance path. Copy the instance path of both the USB Mass Storage and Disk drive nodes into a note.
| Applies to | Windows 10 and 11, all editions |
|---|---|
| Time needed | 5 minutes |
| Difficulty | Easy |
| Cost | Free |
| Needs | The drive and Device Manager |
| Last verified | November 2026 |
Find the IDs in Device Manager
Device Manager shows every ID Windows holds for a USB drive, but you must open the right nodes in the right view. Use Devices by connection, then read two properties on each node: Hardware Ids for the model, and Device instance path for the unit.
Plug in the drive
Insert the drive and wait until it appears in File Explorer, so every node is present.
Switch the view
Right-click Start, open Device Manager, then choose View, Devices by connection. The default view groups by type and hides the parent-child chain.
Open both drive nodes
Under the USB hub, open Properties for USB Mass Storage Device and then for the Disk drive child beneath it.
Read the Details tab
Pick Hardware Ids in the Property list, copy every line, then pick Device instance path and copy that value too.
Write it down
Paste each value into a note beside the node name, because the policy will need both nodes.
Use the narrowest ID that names exactly one unit: instance ID first, hardware ID only when a whole model may connect, class only when nothing narrower exists.
Hardware ID, instance ID and serial number: which one to use
Use the device instance path when one specific drive must be allowed, because it contains the serial number. Use a hardware ID when every drive of one model may connect. Windows compares the full string, so paste the whole value, not just the serial.
| Identifier | Where it appears | Unique to one drive? | Use it when |
|---|---|---|---|
| Hardware ID | Details tab, Hardware Ids | No, shared by the model | A whole model may connect |
| Device instance ID | Details tab, Device instance path | Yes, if a serial exists | Exactly one drive may connect |
| Serial number | Last segment of the instance ID | Yes | Never alone; keep the full string |
| Verdict | Model-wide | Unit-specific | Prefer the instance ID |
Microsoft documents that a policy matching any listed hardware ID for a device is enough to allow it, and that the list for one device runs from most to least specific. That is why a short, generic hardware ID can admit far more than you intend. Drives from some makers report no serial at all; for those, the ID depends on the port, which the blocked-drive page explains.
Find the ID from the command line
The command line gives the same IDs in text you can copy, which suits several PCs. Open an administrator Command Prompt and use pnputil to list connected devices, then ask for the IDs of one instance. Output differs slightly by Windows build.
pnputil /enum-devices /connected
pnputil /enum-devices /instanceid "USB\VID_XXXX&PID_XXXX\SERIAL" /idsMicrosoft's USB documentation shows the second form, which prints the hardware IDs and compatible IDs for the instance you name. Replace the placeholder with a value copied from Device Manager. USB Block's authorized-devices list reads drive identity for you, which suits anyone who would rather not handle strings like these.
Drives that hide in another branch
Card readers, phones in file mode and composite devices can place the storage node under a different branch than the one you expect. If you cannot find the Disk drive, scan every USB hub in Devices by connection, not only the first one.
- A card reader shows one node per slot, so insert a card before you look.
- A phone in file transfer mode appears as a portable device, not a Disk drive.
- A drive behind an external hub nests one level deeper, and the hub carries its own ID.
Copying the hub's ID instead of the disk's. The hub node sits above the drive and has a different instance path.
| Node | Record | Why |
|---|---|---|
| Hub or controller | Instance path | Must not be blocked |
| USB Mass Storage Device | Hardware Ids and instance path | Lets the drive install |
| Disk drive | Instance path | The unit the policy names |
Keep a record of the IDs
Store the IDs where the next administrator can find them. A one-line register per drive prevents the usual failure, which is an allow list that nobody can explain a year later. Include node name, ID, owner and date. Keep the register beside your policy export.
ID register checklist
Readers who prefer software can fetch the Windows installer from the official download page.
Part of our guide to allowing only one specific USB drive on a PC; the matching section is step by step.
Questions about drive IDs
These answers cover ID lookup questions that come up while building an allow list. Each one gives the answer first and the conditions after it. Every answer assumes Windows 10 or 11 and a drive that File Explorer already recognises.
Open Device Manager, choose View, Devices by connection, open the drive's Properties, go to the Details tab and select Hardware Ids in the Property list. Copy each line shown. The list runs from most specific to least specific, so the first line is usually the one you want.
No. Microsoft's guidance says any user account can view device identifiers in Device Manager, while only members of the Administrators group can change devices. Reading properties is safe because nothing changes. You do need an administrator account later, when you write the IDs into a policy.
Yes. Hardware IDs describe a make, model and firmware revision, so identical drives report the same ones. Only the instance ID adds a per-unit serial. Use the instance ID when one drive, not one model, must be allowed. Check both values before you decide.
Short ampersand-separated numbers at the end usually mean the drive reports no serial, so Windows generated a suffix that depends on the port. The ID then changes when you use a different port. A drive with a real serial keeps one ID in every port.
Use pnputil in an administrator Command Prompt. On recent Windows 10 and 11 builds, pnputil /enum-devices /connected lists present devices, and pnputil /enum-devices /instanceid followed by an ID with /ids shows that device's hardware and compatible IDs. Run both from an administrator Command Prompt.