PowerTip: Use PowerShell to Find USB Drives

The Scripting Guys


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'

The Scripting Guys
Dr Scripto

Follow Dr   

No Comments.