How to Use the DevCon Command-Line Utility in Windows 11 to Manage Hardware Devices

Windows Device Manager provides an intuitive graphical interface for inspecting connected hardware, managing device drivers, and diagnosing peripheral conflicts. However, when automating server provisioning, restarting frozen graphics adapters across remote endpoints, or cycling virtual network adapters in automated deployment scripts, a command-line alternative is essential. Microsoft provides the Device Console utility (devcon.exe), an official command-line tool that offers full administrative control over the Windows Driver Model (WDM) and device tree. Using DevCon on Windows 11 allows administrators to query hardware identifiers, disable malfunctioning components, and power cycle drivers without rebooting.

Obtaining and Installing DevCon on Windows 11

Unlike basic command-prompt utilities, devcon.exe is not installed in System32 by default. It is distributed by Microsoft as part of the official Windows Driver Kit (WDK) and Windows Software Development Kit (SDK):

  1. Download the Windows Driver Kit (WDK) or Windows SDK installer from Microsoft’s official developer documentation.
  2. During setup, you only need to select the Tools feature if using the SDK installer.
  3. Once installed, the x64 binary is located in:
    C:\Program Files (x86)\Windows Kits\10\Tools\10.0.<build>.0\x64\devcon.exe
  4. To make DevCon accessible from any terminal prompt, copy devcon.exe to a designated folder (such as C:\Tools) and append that directory to your system PATH environment variable, or run it directly from an elevated terminal.

Querying Hardware Identifiers and Device Status

DevCon interacts with devices using hardware IDs, compatible IDs, or device class names. Before you can manipulate a hardware component, locate its exact identifier:

  1. Open Windows Terminal or PowerShell as an Administrator.
  2. List all active devices belonging to a specific device setup class (such as network adapters):
    devcon.exe classes
  3. To view all network adapters currently connected to your system:
    devcon.exe listclass Net
  4. To query the operational status of a specific device, run the status parameter along with a hardware wildcard:
    devcon.exe status "PCI\VEN_8086*"

    DevCon will report whether the device is running cleanly, encountering driver faults, or disabled.

  5. To find the exact hardware ID of any unknown or unrecognised component flagged in Device Manager:
    devcon.exe findall =unknown

Enabling, Disabling, and Restarting Devices

When an audio interface, capture card, or wireless adapter stops responding, DevCon can reinitialise the hardware stack without requiring a full Windows restart:

  1. Disabling a Problematic Device:

    To safely disable a component, pass its hardware ID to the disable command:

    devcon.exe disable "@PCI\VEN_10EC&DEV_8168&SUBSYS_00000000&REV_06\4&1839A20F&0&00E2"

    Prefixing the hardware path with an at symbol (@) ensures an exact match against that specific physical instance rather than disabling all matching vendor devices.

  2. Enabling the Device:

    To bring the hardware back online:

    devcon.exe enable "@PCI\VEN_10EC&DEV_8168&SUBSYS_00000000&REV_06\4&1839A20F&0&00E2"
  3. Restarting a Device Stack in a Single Command:

    Rather than manually disabling and enabling in two steps, execute the restart parameter:

    devcon.exe restart "PCI\VEN_10DE*"

    This command tears down the driver stack and immediately re-binds the driver, resolving audio crackle, dropped Wi-Fi handshakes, and GPU driver timeouts.

Rescanning the Plug and Play Bus

If you connect a Thunderbolt dock, external PCIe enclosure, or USB device that Windows 11 fails to enumerate immediately, trigger an asynchronous bus rescan:

devcon.exe rescan

This command instructs the Plug and Play (PnP) manager to traverse all root hubs, PCIe switches, and system buses, detecting newly attached hardware and binding appropriate drivers automatically.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.