[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[转载代码] [PowerShell每日技巧]查看已知的USB驱动器(20131205)

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

回复 2# ludongwang


    好好学英文。好处大大滴

TOP

呀,全英文的这是,是个挑战。

TOP

返回列表