Home » Questions » Computers [ Ask a new question ]

How do I find the Serial Number of a USB Drive?

How do I find the Serial Number of a USB Drive?

I'm trying to re-enable USB Autoplay in a secure way, by installing a program on each of the computers that I use so that I can run my launcher (PStart in this case) whenever I plug in my specific USB drive. The tool that I'm using to enable this - AutoRunGuard - needs the serial number of the USB drive that I am using. I can't figure out where to find this in Windows. Ideally I would not need to install and run a separate program to do this (seemingly) simple task.

Asked by: Guest | Views: 412
Total answers/comments: 4
bert [Entry]

"Use the freeware USBDeview:

USBDeview is a small utility that
lists all USB devices that currently
connected to your computer, as well as
all USB devices that you previously
used. For each USB device, exteneded
information is displayed: Device
name/description, device type, serial
number (for mass storage devices), the
date/time that device was added,
VendorID, ProductID, and more...
USBDeview also allows you to uninstall
USB devices that you previously used,
and disconnect USB devices that are
currently connected to your computer.
You can also use USBDeview on a remote
computer, as long as you login to that
computer with admin user."
bert [Entry]

"Get USB Serial Numbers on Windows with PowerShell

Here's a PowerShell solution that will give you the serial number of all ""USB Mass Storage Devices"" mounted on the system which you run it. It uses Get-CIMInstance to query the Win32_PnPSignedDriver class to get the property values with filtering, looping, setting a couple variables, using a method, etc.

Within the PowerShell script below, I left some commented out logic and comments for running with the legacy Get-WMIObject cmdlet for systems with versions below PowerShell 3.0.

PowerShell

$DevId = (((Get-CimInstance -Class win32_PnPSignedDriver) | ?{($_.Description -like '*mass*')}).DeviceID);
$DevSerial = @($DevId | %{$_.Split('\')[2]});
$DevSerial

##### // Everything below is commented out with comments for each section \\ #####

## -- See everything or the selected properties per above
#((Get-CimInstance -Class win32_PnPSignedDriver) | ?{($_.Description -like '*mass*')}) |
#Select Description, DeviceClass, DeviceID, Manufacturer

## -- Correlated legacy PS code older than PowerShell version 3
#$DevId = ((Get-WmiObject Win32_USBControllerDevice | %{[wmi]($_.Dependent)} | ?{($_.Description -like '*mass*')}).DeviceID);
#$DevSerial = @($DevId | %{$_.Split('\')[2]});
#$DevSerial

## -- See everything or selected properties per above legacy PS code
#Get-WmiObject Win32_USBControllerDevice | %{[wmi]($_.Dependent)} | ?{($_.Description -like '*mass*')} |
#Select Description, DeviceID, Manufacturer, Service

Supporting Resources

Get-CIMInstance
Win32_PnPSignedDriver class
ForEach-Object

Standard Aliases for Foreach-Object: the '%' symbol, ForEach

Where-Object

The '?' symbol and Where are both aliases for Where-Object. If you
explicitly want to run the Where-Object command, run Where-object or
'?'

Comparison Operators
Split()
PowerShell one liner to get USB Flash Drive Serial Number
Get Information from Windows device manager"
bert [Entry]

"Right Click 'Computer' -> 'Manage' -> 'Device Manager' -> Navigate to your USB Drive, Right Click -> Properties -> Details

Edit: Unfortunately I have no idea where he got this IDs from, bu the 'Device Instance Id' is the closest guess I have:

USBSTOR\DISK&VEN_&PROD_USB_DISK_2.0&REV_PMAP\07960501655B0CEE&0

It should be the last part after the \ and without the &0"
"Right Click 'Computer' -> 'Manage' -> 'Device Manager' -> Navigate to your USB Drive, Right Click -> Properties -> Details

Edit: Unfortunately I have no idea where he got this IDs from, bu the 'Device Instance Id' is the closest guess I have:

USBSTOR\DISK&VEN_&PROD_USB_DISK_2.0&REV_PMAP\07960501655B0CEE&0

It should be the last part after the \ and without the &0"
bert [Entry]

"On linux you can simply do,

lsusb -v

It will print all information about usb devices along with serial number also."