Did you know that Windows maintains a list of all USB storage devices ever hooked up to your machine? And it's simple to dump that list:
$Path = 'HKLM:\SYSTEM\CurrentControlSet\Enum\USBSTOR\*\*'
Get-ItemProperty -Path $Path |
Select-Object -Property FriendlyName, CompatibleIDs, Mfg
The result will look similar to this:
FriendlyName CompatibleIDs Mfg
------------ ------------- ---
HUAWEI Mass Storage USB Device {USBSTOR\CdRom, USBSTOR\RAW} @cdrom.inf,%genmanufacturer%;...
TENDYRON U-DISK USB Device {USBSTOR\CdRom, USBSTOR\RAW} @cdrom.inf,%genmanufacturer%;...
General USB Flash Disk USB Device {USBSTOR\Disk, USBSTOR\RAW} @disk.inf,%genmanufacturer%;(...
Generic External USB Device {USBSTOR\Disk, USBSTOR\RAW} @disk.inf,%genmanufacturer%;(...
Ithink B52USB3.0 USB Device {USBSTOR\Disk, USBSTOR\RAW} @disk.inf,%genmanufacturer%;(...
Kingston DT CNY 13 Snake USB D... {USBSTOR\Disk, USBSTOR\RAW} @disk.inf,%genmanufacturer%;(...
SanDisk Cruzer Blade USB Device {USBSTOR\Disk, USBSTOR\RAW} @disk.inf,%genmanufacturer%;(...
Ut165 USB2FlashStorage USB Device {USBSTOR\Disk, USBSTOR\RAW} @disk.inf,%genmanufacturer%;(... |
The longer the list, the more different USB storage device contacts did your computer have.
http://powershell.com/cs/blogs/tips/archive/2013/12/05/finding-known-usb-drives.aspx |