pnputilpnputil /enum-devices /disconnected: List Removed Devices
Learn how to use pnputil /enum-devices /disconnected to list non-present devices, clean up stale drivers, and troubleshoot hardware issues.
The pnputil /enum-devices /disconnected command lists devices that are not currently connected to the system, often called non-present or removed devices. It helps identify stale device instances, troubleshoot hardware issues, and audit driver inventory without touching active devices.
Whether you are a system administrator cleaning up old USB device entries, an IT professional investigating driver conflicts, or a support engineer preparing a hardware migration, this command gives you a quick, safe snapshot of devices that are no longer connected.
This guide covers syntax, output fields, detailed examples, troubleshooting, related commands, FAQs, and a quick reference card. By the end, you will confidently use pnputil /enum-devices /disconnected for device audits and cleanup workflows.
What Is pnputil /enum-devices /disconnected?
pnputil is a Windows command-line tool for managing device drivers and device instances. The /enum-devices option lists devices, and the /disconnected flag filters the list to show only devices that are not currently attached. These are typically historical devices such as old USB peripherals, virtual adapters, or hardware that has been removed.
The command is read-only and safe for production systems. It is commonly used before driver cleanup or hardware refresh projects to understand what is still referenced by the OS.
Syntax
pnputil /enum-devices /disconnected
Parameters and Options
| Parameter | Description | Example |
|---|---|---|
/enum-devices | Enumerates device instances | pnputil /enum-devices |
/disconnected | Filters to non-present devices | pnputil /enum-devices /disconnected |
Output Fields and Meaning
pnputil /enum-devices /disconnected returns multiple fields for each device instance. The exact output can vary by Windows version, but common fields include:
Instance ID
Unique identifier for the device instance. This value is used for targeted removal or diagnostics.
Device Description
Human-readable device name, useful for quick identification.
Class Name
Device class such as USB, Display, Media, or Net. This helps group similar devices.
Present
Indicates whether the device is currently present. For this command, it is typically No.
Examples (HowTo)
1. List all disconnected devices
Scenario: You want to audit non-present devices before cleanup.
pnputil /enum-devices /disconnected
Expected output (excerpt):
Instance ID: USB\VID_046D&PID_C52B\5&1a2b3c4d&0&2
Device Description: Logitech USB Receiver
Class Name: USB
Present: No
Explanation: This lists devices that are not connected, including old USB receivers.
2. Export output for documentation
Scenario: You need to attach device inventory to a change ticket.
pnputil /enum-devices /disconnected > C:\Logs\disconnected-devices.txt
Explanation: Saves a report for audit or troubleshooting documentation.
3. Compare with connected devices
Scenario: You want to see what is missing versus active hardware.
pnputil /enum-devices
pnputil /enum-devices /disconnected
Explanation: The first command shows all devices, the second filters to non-present devices.
4. Identify stale USB devices by class
Scenario: You suspect old USB devices are causing conflicts.
pnputil /enum-devices /disconnected
Explanation: Review entries with Class Name: USB to find old peripherals.
5. Prepare for removal (manual step)
Scenario: You want to clean up a specific device instance.
pnputil /enum-devices /disconnected
Explanation: Note the Instance ID for later use with removal tools.
6. Capture snapshot before migration
Scenario: You need a baseline before moving a machine to new hardware.
pnputil /enum-devices /disconnected > C:\Logs\baseline-disconnected.txt
Explanation: Provides a reference snapshot of stale devices prior to migration.
Common Use Cases
-
USB cleanup – Identify old USB devices that are no longer used.
-
Driver conflict investigation – Find stale device instances that may leave drivers behind.
-
Hardware refresh projects – Document devices before moving to new hardware.
-
Security audits – Identify legacy devices that were previously connected.
-
VDI and lab systems – Reset device states in shared environments.
-
Support diagnostics – Provide device history evidence for troubleshooting.
-
Device inventory – Include disconnected devices in asset management reports.
-
Peripheral troubleshooting – Confirm if a device was ever installed.
-
Compliance checks – Validate that old devices are not still present.
-
Change management – Record device state before system changes.
Tips and Best Practices
-
Use admin rights for full visibility – Some devices may only appear with elevated privileges.
-
Export reports regularly – Keep logs for compliance and incident investigations.
-
Review device classes – Focus on USB, Net, and Display classes for common issues.
-
Avoid removing devices blindly – Removal can impact drivers for reconnected hardware.
-
Pair with driver inventory – Use
pnputil /enum-driversto correlate devices and drivers. -
Document Instance IDs – These are required for targeted actions.
-
Check after hardware changes – Compare snapshots before and after upgrades.
-
Use consistent naming – Store reports in a structured location.
-
Keep backups – Export system restore or driver backups before cleanup.
-
Test in non-production first – Validate cleanup workflows on lab systems.
Troubleshooting Common Issues
"Access is denied"
Problem: The command fails or returns limited results.
Cause: Insufficient privileges.
Solution: Run Command Prompt as Administrator.
Prevention: Use an elevated terminal for device enumeration.
Output looks empty
Problem: No devices are listed.
Cause: There may be no disconnected devices, or filters are too narrow.
Solution: Run pnputil /enum-devices to verify connected devices exist.
Prevention: Use baseline snapshots to confirm device history.
Instance ID is hard to read
Problem: Instance IDs are long and complex.
Cause: Device instance IDs are structured by design.
Solution: Copy output to a file and use search tools to isolate a device.
Prevention: Always export output when performing audits.
Device removal breaks reconnect
Problem: Removing device instances causes issues when the device is reconnected.
Cause: Device removal can remove driver associations.
Solution: Reinstall the device driver or use Windows Update to restore it.
Prevention: Remove devices only when necessary and document changes.
Related Commands
pnputil /enum-devices
Lists all devices, present and non-present, for a full inventory.
pnputil /enum-drivers
Lists driver packages to correlate stale devices with installed drivers.
pnputil /remove-device
Removes a device instance by Instance ID (use with caution).
devmgmt.msc
Opens Device Manager for visual inspection and manual cleanup.
driverquery
Provides a driver inventory for auditing and troubleshooting.
Frequently Asked Questions
What does pnputil /enum-devices /disconnected show?
It lists devices that are not currently connected to the system, often called non-present devices.
Is this command safe to run?
Yes. It is read-only and does not change device state.
Can I remove devices after listing them?
Yes, but removal should be done carefully using pnputil /remove-device or Device Manager.
Why are there so many USB devices?
Windows creates device instances for every USB port and device combination, so historical entries accumulate.
Does it show hidden devices?
Yes, it can show devices that are not currently present, which are often hidden in Device Manager by default.
Do I need admin rights?
Admin rights are recommended for full visibility and accurate results.
Can I export the output?
Yes, redirect output to a file with > for documentation.
How do I list only connected devices?
Use pnputil /enum-devices without /disconnected.
Quick Reference Card
| Command | Purpose | Example |
|---|---|---|
pnputil /enum-devices | List all devices | pnputil /enum-devices |
pnputil /enum-devices /disconnected | List non-present devices | pnputil /enum-devices /disconnected |
pnputil /enum-drivers | List driver packages | pnputil /enum-drivers |
pnputil /remove-device <InstanceID> | Remove device instance | pnputil /remove-device "USB\VID_..." |
CTA: Practice and Explore
Practice Windows device management commands in the Windows Command Simulator and explore more tools in the Commands Reference. For related system utilities, see pnputil and driverquery.
Summary
pnputil /enum-devices /disconnected provides a reliable, read-only list of non-present devices, helping you audit stale device instances, troubleshoot driver conflicts, and document hardware history. Use it for cleanup planning, compliance audits, and migration readiness without affecting active hardware.
Export results for documentation, review device classes for quick filtering, and pair this command with driver inventory tools when planning removals. With careful usage, this command keeps device management clean and predictable across Windows systems.