0% found this document useful (0 votes)
14 views

Eject _ disconnect USB device from command-line (Safely Remove Hardware)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Eject _ disconnect USB device from command-line (Safely Remove Hardware)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

12/18/24, 9:53 AM Eject / disconnect USB device from command-line (Safely Remove Hardware)

Install
For windows 10, 11 32/64 bit Install
Get Fast!

Main Page How to eject / disconnect a USB device (Safely Remove Hardware) from
Blog command line on Windows
Search
FAQ USBDeview is a freeware tool for Windows which allows you to easily eject/disconnect (Also known as "Safely Remove
Hardware") any USB device from command-line and GUI.
TOP 10
In order to disconnect your USB device, you have to run USBDeview, and find the USB device that you want to
Pad Files eject/disconnect:
Contact
About...
Donate
All Utilities
Password Tools
System Tools
Browser Tools
Programmer Tools
Network Tools
Outlook/Office
64-bit Download
Panel
Forensics
Pre-Release Tools
Articles
Let's say that you want to eject the 'SanDisk Cruzer' USB device in the above screenshot, so the command to eject this
USB device is:
USBDeview.exe /stop "USB\VID_0781&PID_5567\4C530001140304113343"

In the above example, I used the string of 'Instance ID' column. It's also possible to use the string of the 'Description'
column. You can use the full string, or only part of the string. In the above screenshot, the decsription string of the device
is 'SanDisk Cruzer Blade USB Device', but it's possible to use only part of this string to eject the device, for example:
USBDeview.exe /stop "SanDisk Cruzer"

USBDeview also provides additional commands to disconnect USB devices. For example, you can disconnect a device
Install according to its VendorID and ProductID:
USBDeview.exe /stop_by_pid "0781;5567"

There is also a command to disconnect according to the drive letter of mass storage device, for example:
USBDeview.exe /stop_by_drive d:
For It's also possible to disconnect a USB device according to its class/subclass/protocol (These values are displayed in the
windows following columns: 'USB Class', 'USB Subclass', 'USB Protocol'), for example - in order to disconnect all USB Mass
10, 11 Storage Devices:
USBDeview.exe /stop_by_class 08;06;50
32/64 bit
You can see all available commands to eject a USB device in USBDeview Web page.

Get Fast!

Install

https://www.nirsoft.net/articles/eject_disconnect_usb_device_command_line.html 1/2
12/18/24, 9:53 AM Eject / disconnect USB device from command-line (Safely Remove Hardware)

https://www.nirsoft.net/articles/eject_disconnect_usb_device_command_line.html 2/2

You might also like