Finding the USB Storage Drives Ever Connected to Your Computer

Do you know Windows actually keeps a history of all USB drives ever connected to your computer? Every time you plug in a USB device into your computer, Windows not only installs the drive and gets it ready for you to use but also writes an entry into the system to keep a history of what’s happened.

You can check those hidden unconnected USB devices by turning on Show hidden devices in Device Manager.

Device Manager - show hidden devices 2

Or use tools such as NirSoft’s USBDeview┬áthat displays such a history in a more comprehensive way.

NirSoft - USBDeview

Or, in a PowerShell way, which is pretty cool:

$Path = 'HKLM:\System\Current\Enum\USBStor\*\*'

Get-ItemProperty -Path $Path | Select-Object -Property FriendName, CompatibleIDs, Mfg

PowerShell - list usb drives

Basically, what it does is to perform a query to a Registry entry that stores all USB storage connection information, and list them with specified columns. Not sure how much of a value this would give to you but I am sure it would be a good example showing you how much PowerShell can do. Enjoy.

Kent Chen

Microsoft MVP, IT Professional, Developer, Geek, and the co-founder of Next of Windows.

Last updated: 08/04/2014

Posted in: Tips & Tricks
Discover more: ,