How to List USB Devices Using PowerShell in Windows 11
Listing the USB devices connected to or known by your PC helps when troubleshooting peripherals or auditing connected hardware. PowerShell can enumerate USB devices, giving a command-line view of what is attached.
The Command
Get-PnpDevice -Class USB | Select-Object Status, FriendlyName
What It Does
`Get-PnpDevice -Class USB` lists devices in the USB class, and selecting Status and FriendlyName shows whether each is working (OK) and its readable name. The result is a list of USB controllers and devices YYGACOR Resmi with their states, useful for confirming a device is recognized or spotting one that is not functioning properly.
When You’d Use This
This is useful for troubleshooting USB peripherals, confirming that a device is recognized by Windows, or auditing what USB hardware is connected. When a USB device is not working, checking whether it appears and its status helps determine whether Windows sees it at all, which narrows down whether the problem is the device, the port, the cable, or the driver.
Useful Variations
To see all device classes, omit the `-Class USB` filter, though that produces a long list. To find devices with problems, filter with `Where-Object { $_.Status -ne ‘OK’ }`. The older `wmic path win32_usbcontrollerdevice` command also lists USB relationships, but the PnpDevice approach is clearer and more modern.
If It Doesn’t Work
If a device shows a status other than OK, such as Error or Unknown, Windows is not handling it correctly, pointing to a driver or connection issue worth investigating in Device Manager. Remember the list includes controllers and hubs alongside actual peripherals, so not every entry is something you plugged in. Filtering for non-OK statuses helps surface just the devices that have problems.
Good to Know
The list includes USB controllers and hubs alongside actual peripherals, so not every entry is a device you plugged in. A status other than OK, such as Error or Unknown, points to a device that Windows is not handling correctly, which is a useful clue when a USB peripheral is not working as expected.
Putting It Together
The command shown may look dense at first, but it breaks down into clear parts once you have used it a few times. As part of gathering facts about your hardware and Windows setup, this command saves you from digging through settings screens. Together with the others in this area, it lets you document a system’s full configuration or answer a specific specification question in seconds from the terminal. Like anything in the terminal, the real value comes from trying it on your own system and adapting the variations above to what you actually need, so it is worth experimenting with in a safe, low-stakes situation before relying on it in a script or during troubleshooting. Keeping a note of the commands you find most useful, along with the variations that fit your workflow, turns scattered one-off tricks into a personal reference you can draw on whenever a similar task comes up again.