USB: Universal Serial Bus

How to List USB Devices in CMD Prompt

💬 Comments

If you're looking to find and list connected USB devices in your Windows 10 operating system, you can easily do so using the CMD prompt. In this guide, we'll provide step-by-step instructions on how to achieve this.

  1. Launch PowerShell or Windows Terminal
  2. Enter the Command
  3. How to List All USB Devices
  4. How to List Drives in CMD
  5. Which Command Is Used to Obtain a List of USB Devices
  6. How to Get Device Name From CMD
  7. Useful Tips and Takeaways
  8. Conclusion

Launch PowerShell or Windows Terminal

To begin, you'll need to launch either PowerShell or Windows Terminal with the 'PowerShell' profile. Both of these options will allow you to execute the necessary commands to retrieve the list of connected USB devices.

Enter the Command

Once you have launched PowerShell or Windows Terminal, enter the following command:

Get-PnpDevice -PresentOnly | Where-Object { $_.IsPresent -eq $True }

This command will fetch a list of all present USB devices and display it for you.

How to List All USB Devices

If you prefer using Device Manager to display USB information, you can follow these steps:

  1. Press the Windows logo key and R simultaneously to open the Run window.
  2. In the Run window, enter `devmgmt.msc` and hit Enter. This will open the Device Manager.
  3. In Device Manager, select your computer name to highlight it.
  4. Go to the "Action" menu and select "Scan for hardware changes".

By following these steps, you will be able to list all USB devices using Device Manager.

How to List Drives in CMD

If you're specifically interested in listing drives using the CMD prompt, here's what you need to do:

  1. Right-click on the "Command Prompt" application and choose "Run as Administrator".
  2. In the Command Prompt window, type "diskpart" and hit Enter. This will launch the DiskPart tool.
  3. At the DiskPart prompt, type "list disk" and hit Enter. This command will display a list of all the hard drives in your system.

Following these instructions will allow you to retrieve a comprehensive list of drives using the CMD prompt.

Which Command Is Used to Obtain a List of USB Devices

In Linux, the `lsusb` command, also known as the "List USB" command, is used to obtain a list of all the USB devices connected to the system. Executing this command in a Linux terminal will display detailed information about the USB devices.

How to Get Device Name From CMD

If you're looking to retrieve the device name from the CMD prompt, you can follow these steps:

  1. Press the key combination Windows + R to open the Run window.
  2. In the Run window, type "cmd" and press Enter. This will open the CMD prompt.
  3. In the CMD prompt, type "hostname" and press Enter. The computer name will then be displayed.

By following these steps, you can easily retrieve the device name using CMD.

Useful Tips and Takeaways

  • When listing USB devices in Windows 10, you have the option to use either PowerShell or Windows Terminal.
  • If you prefer using Device Manager, you can scan for hardware changes to display USB information.
  • To list drives in CMD, you can use the DiskPart tool and the command "list disk".
  • In Linux, the "lsusb" command provides a comprehensive list of connected USB devices.
  • The CMD prompt can also be used to retrieve the device name using the command "hostname".

Conclusion

Being able to list USB devices and retrieve important information from the CMD prompt can be invaluable for troubleshooting and system management purposes. By following the steps outlined in this guide, you can confidently navigate the CMD prompt and gather the necessary data about connected USB devices.

What Is the Difference Between Rufus Normal and Portable
Up
...