List Connected USB Devices with Get-PnpDevice
See every currently attached USB device, its driver status, and instance ID — faster than clicking through Device Manager.
01Command
$ Get-PnpDevice -PresentOnly -Class USB | Format-Table FriendlyName, Status, InstanceId02What it does
When a USB drive shows up in one app but not another, or a hub drops devices randomly, this one command shows what Windows actually sees right now. -PresentOnly limits results to currently connected hardware (dropping it reveals the whole history of ever-plugged devices), and -Class USB targets the USB bus controllers and hubs. Status "Error" means a driver failed to load — check that row's InstanceId, which is exactly what pnputil and driver tools need to fix it. Devices classified as disks/phones under their own classes (DiskDrive, WPD) don't appear under Class USB, so widen the filter if you're hunting a specific peripheral.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-PnpDeviceEvidence: Documents Get-PnpDevice with -PresentOnly and -Class filters and the Status property (OK/Error/Unknown).
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.
Purge cached DNS lookups so Windows re-resolves hostnames from scratch — the fix for 'the new server is live but my browser still hits the old one'.
Search inside text files and logs with regex, returning file, line number and match.