Safely Remove Hardware Not Working? Use DiskPart


It’s one of the most annoying features of Windows — you click on the Safely Remove Hardware and Eject Media icon located in the taskbar, but nothing happens. Windows plainly tells you that it is unable to stop and remove the device.

Problem Ejecting USB Mass Storage Device

Even though you close all the windows, you are still unable to safely remove your external USB drive.

The most common reason for this is that your antivirus program is running a scan of the drive in the background. However, it is not easy to stop that process. And it is not practical to permanently turn off the scanning of external drives.

Over the years, I have used a couple of very helpful software tools to overcome this problem — Dev Eject and USB Disk Ejector immediately come to mind.

However, when both these external programs also fail, here is the nuclear option that will always work.

Ever since Windows Vista, there is a cool little program present in the Windows operating system called DiskPart. DiskPart helps you manage your computer’s drives, be it disks, partitions, volumes, or virtual hard disks.

The correct way to use this tool is to launch Command Prompt or one of its alternatives (I like ConEmu most). Then type and enter the following commands:

DiskPart Commands

The first command lists all the disks that are currently available to the operating system.

The second command selects one of the disks. Make sure that you select the correct disk here, because the disk will be in focus from that point on. Any further commands will be applied to that disk.

And, finally, the third command takes the disk to offline state.

To learn more about DiskPart, read its Microsoft TechNet tutorial.

After you took the disk offline, you can now retry removing it safely using the taskbar icon. It will work 100% of the time.

Important Note

The next time you want to access the disk you took offline, you will have to take it back online. The process is the same but the third command will be online disk.

Liked this post?

Subscribe to our newsletter to receive early notification of new posts and deals:
[mc4wp_form id=”45″]

Next Post »« Previous Post