To safely eject a disk using DISKPART, open an administrator Command Prompt, type diskpart, enter list volume, identify the target volume by its drive letter or number, select it with select volume <number>, and then type remove all dismount to dismount and offline the volume, allowing it to be safely removed.
Step-by-step guide:
1. Open Command Prompt as Administrator:
Search for "Command Prompt" in the Start menu, right-click it, and select "Run as administrator".
2. Start DISKPART:
In the Command Prompt, type diskpart and press Enter to enter the DISKPART utility.
3. List Volumes:
Type list volume and press Enter to display all available volumes, noting the number of the volume you wish to eject.
4. Select the Volume:
Type select volume <number> (replacing <number> with the actual volume number) and press Enter to select it.
5. Dismount the Volume:
Type remove all dismount and press Enter. This will dismount and offline the volume, making it safe to remove.
6. Exit DISKPART:
Type exit and press Enter to leave the DISKPART utility.
After completing these steps, you can now physically remove the storage device.
💡 About the Author:
Sana Allah Kheiri is the founder of Paratopic Technologies LLC and leads the company’s research and development in AI, cybersecurity, and digital freedom initiatives. Through his blog and technology campaigns, he advocates for the decentralization of digital rights in authoritarian-leaning environments.