What command is used to display information about the device?

Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Device Console (DevCon.exe) Commands

  • Article
  • 07/27/2022
  • 3 minutes to read

In this article

DevCon (DevCon.exe) is a command line tool that can display detailed information about devices on computers running Windows. You can also use DevCon to enable, disable, install, configure, and remove devices. DevCon uses the following syntax.

devcon [/r] command [arguments]

Important

PnPUtil ships with every release of Windows and makes use of the most reliable and secure APIs available and it's use is recommended. For more information on using PnPutil instead of devcon, see PnPUtil.

Parameters

Note

To change the status or configuration of a device, you must be a member of the Administrators group on the computer.

The parameters in a DevCon command must appear in the order shown in the syntax. If parameters are not in order, DevCon ignores them, but does not display a syntax error. Instead, it processes the command with the remaining parameters.

For help on command syntax, you can use the following commands in a Command Prompt window: DevCon help or DevCon help command.

/r
Conditional reboot. Reboots the system after completing an operation only if a reboot is required to make a change effective.

This parameter differs from the DevCon Reboot operation, which forces the system to reboot. Instead, the /r parameter determines whether a reboot is required based on the return code from the accompanying operation.For more information, see Rebooting and restarting.

command
Specifies a DevCon command. For information about the available DevCon commands and the command arguments, use the following list.

You can also get syntax help in a Command Prompt window using DevCon help command.

To list and display information about devices on the computer, use the following commands:

DevCon HwIDs

DevCon Classes

DevCon ListClass

DevCon DriverFiles

DevCon DriverNodes

DevCon Resources

DevCon Stack

DevCon Status

DevCon Dp_enum

To search for information about devices on the computer, use the following commands:

DevCon Find

DevCon FindAll

To manipulate the device or change its configuration, use the following commands:

DevCon Enable

DevCon Disable

DevCon Update

DevCon UpdateNI

DevCon Install

DevCon Remove

DevCon Rescan

DevCon Restart

DevCon Reboot

DevCon SetHwID

DevCon ClassFilter

DevCon Dp_add

DevCon Dp_delete

arguments
Specifies the arguments for a DevCon command.

/? or help
Displays help. If you specify an operation, DevCon displays detailed help for the operation.

The parameters must appear in the specified order. For example, to display help for the DevCon Status operation, type devcon /? status (or devcon help status), not devcon status /?.

Comments

Many DevCon operations require the hardware ID of the device. To create a list of the hardware IDs of all devices on the computer for use in subsequent DevCon operations, begin with a DevCon HwIDs command. For more information, see Hardware IDs and Device Identification Strings.

How DevCon searches for devices

DevCon identifies devices by their computer name, hardware ID, compatible ID, device instance ID, and/or device setup class.

If a command includes more than one ID or ID pattern (an ID that contains wildcard characters (*)), DevCon returns devices whose IDs match any of the IDs or ID patterns. That is, it assumes an "or" between the ID arguments.

For example, devcon hwids *pnp* *mou* returns devices that include either "pnp" or "mou" in their hardware ID or compatible ID.

If a command includes a device setup class, DevCon first limits the search to the setup class and then returns devices in the class that match any of the ID patterns, that is, it assumes an "and" between the class and the IDs and an "or" between each of the ID arguments.

For example, devcon hwids =media *pnp* *microsoft* returns devices in the media device setup class that include either "pnp" or "microsoft" in their hardware ID or compatible ID.

Rebooting and restarting

DevCon provides two methods to reboot the operating system and one method to restart devices.

  • The /r parameter is a conditional reboot that reboots the operating system only if a reboot is required to make the accompanying operation effective. This parameter is valid only in commands that include a DevCon operation. It can reboot the system on a local computer.

  • The DevCon Reboot operation forces the operating system to reboot. It is valid only on a local computer, and it cannot be combined with other operations. Instead of using the reboot operation, users typically add the /r parameter to commands.

  • The DevCon Restart operation restarts the specified devices. It is valid only on a local computer, and it cannot be combined with other operations.

DevCon return codes

DevCon returns an integer that can be used in programs and scripts to determine the success of a DevCon command (for example, return = devcon hwids *).

The following table lists and describes the return codes.

Return codeDescription
0 Success
1 Requires reboot
2 Failure
3 Syntax error

Feedback

Submit and view feedback for

What is the command for display?

The display command is useful for obtaining data on a variety of processes. You can use display commands to perform the following actions: Display servants. Display trace settings and Java string trace settings.

Which command is used to identify network devices?

A simple way to identify an "unknown device on a network" is through the command-line interface (CLI) of your computer system. Operating systems such as Windows, Linux, and macOS have their own set of networking commands such as "ipconfig" and “ping” for basic scanning and troubleshooting.

What is the device command?

Device commands instruct your device to take an action. Commands include a name and an optional payload. Then the device's firmware takes the appropriate action based on the command and payload.

What is display command Linux?

OVERVIEW. The display program is a member of the ImageMagick(1) suite of tools. Use it to isplay an image or image sequence on any X server. For more information about the display command, point your browser to file:///usr/share/doc/ImageMagick-6.2.8/www/display.html or http://www.imagemagick.org/script/display.php.