PowerTip: Use PowerShell to Find USB Drives

Doctor Scripto

Dr Scripto

Summary: Use Windows PowerShell 4.0 function to find USB drives on Windows 8.1.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find how many drives attached to my system are using USB interfaces?

Hey, Scripting Guy! Answer Open Windows PowerShell 4.0 in Windows 8.1 with admin rights, use the Get-Disk function
          to find all disk objects, and then filter for a bustype of USB:

get-disk | where bustype -eq 'usb'

Doctor Scripto
Dr Scripto

Scripter, PowerShell, vbScript, BAT, CMD

Follow Dr Scripto   

0 comments

    Leave a comment