Windows: `lsusb` Equivalent – PowerShell

The lsusb command in Linux, known as the “List USB” command, is widely used to list the connected USB devices and display the information about them.

One of the quickest ways to list the connected USB devices in Windows is by using the “Device Manger”: simply press the ⊞ Win key to open the “Start Menu” and type “device manager” to search for the app.

You can also open the “Device Manager” through the “Run” dialog, by pressing the ⊞ Win + R and executing the devmgmt.msc command.

Although there is no direct equivalent to the lsusb command in Windows, you can use the PowerShell’s Get-PnpDevice command to list the connected USB devices and display the information about them.

Cool Tip: Check the real actual size of USB flash drive or SD card! Read More →

Lsusb Command in Windows

Use the PowerShell’s Get-PnpDevice command as a Windows lsusb equivalent to list all the connected USB devices:

PS C:\> Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }
- sample output -
Status       Class           FriendlyName                            InstanceId
------       -----           ------------                            ----------
OK           USB             USB Composite Device                    USB\VID_0408...
OK           USB             USB Root Hub (USB 3.0)                  USB\ROOT_HUB...
OK           HIDClass        USB Input Device                        USB\VID_046D...
OK           USB             Generic USB Hub                         USB\VID_05E3...
OK           USB             USB Composite Device                    USB\VID_046D...
OK           Camera          HP HD Camera                            USB\VID_0408...
OK           Bluetooth       Intel(R) Wireless Bluetooth(R)          USB\VID_8087...
OK           USB             Generic SuperSpeed USB Hub              USB\VID_05E3...
OK           HIDClass        USB Input Device                        USB\VID_046D...

To display the complete information about the connected USB devices (including vendor and product IDs), use the Format-List filter:

PS C:\> Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' } | Format-List
- sample output -
Caption                     : USB Input Device
Description                 : USB Input Device
InstallDate                 :
Name                        : USB Input Device
Status                      : OK
Availability                :
ConfigManagerErrorCode      : CM_PROB_NONE
ConfigManagerUserConfig     : False
CreationClassName           : Win32_PnPEntity
DeviceID                    : USB\VID_046D&PID_C535&MI_00\7&11A3A82D&1&0000
ErrorCleared                :
ErrorDescription            :
LastErrorCode               :
PNPDeviceID                 : USB\VID_046D&PID_C535&MI_00\7&11A3A82D&1&0000
PowerManagementCapabilities :
PowerManagementSupported    :
StatusInfo                  :
SystemCreationClassName     : Win32_ComputerSystem
SystemName                  : DESKTOP-0041
ClassGuid                   : {745a17d0-73d3-11f0-b7fe-01a0c90f47da}
CompatibleID                : {USB\Class_03&SubClass_01&Prot_01, USB\Class_03&SubClass_01}
HardwareID                  : {USB\VID_046D&PID_C535, USB\VID_046D&PID_C535}
Manufacturer                : (Standard system devices)
PNPClass                    : HIDClass
Present                     : True
Service                     : HidUsb
PSComputerName              :
Class                       : HIDClass
FriendlyName                : USB Input Device
InstanceId                  : USB\VID_046D&PID_C535&MI_00\6&11B3A84D&1&0000
Problem                     : CM_PROB_NONE
ProblemDescription          :

Leave a Reply