Windows – Remove USB device from CMD with Diskpart.

Ejecting USB drives while in the Windows Recovery Console / System Recovery Command Prompt, so it is unlikely any of the utilities above will help. In such a situation, the following method using Diskpart should work:

  1. Type diskpart and wait for the diskpart prompt (DISKPART>)
  2. Type list volume
  3. Note the volume number of the USB drive carefully (use listed properties such as drive letter, label, type and size for help)
  4. Type select volume <number>, where <number> is the volume number noted above


  5. Type remove all dismount
  6. Type exit to quit Diskpart

Now you should be able to safely remove your USB drive without fear of data loss.