Hey Y’all,
Have you experienced that dreaded “Unable to Remove Device” error message when trying to eject a USB attached drive? I’ve developed a PowerShell program which should tell you what application/process is blocking the removal and offer to get rid of it for you.
Of course, since writing this I have been unable to fully test it as I can’t get any of my devices to fail the removal request!
I’ve set the program to kick off via a scheduled task that detects ID 225 in the System Event Log.
Here’s how you set it up:
- Download the PowerShell (Test-EjectionFailure.zip) from here.
- Unzip it and place it where ever you want.
- Setup a Scheduled Task to run the script as follows:
Set to run as Admin (may not be necessary but who knows).
Set the Action:
Set Program/Script: “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe”
Set Arguments: “d:\yourpathhere\Test-EjectionFailure.ps1”
Set Trigger: as shown above. - Save Task.
Now just wait for a USB device to fail to eject and follow the insturctions in the program, if it pops up! Let me know how things turn out.
Worst case is the program will stop the wrong process (read the message carefully before allowing it to do that!) requiring a reboot to get things back to normal.
TIA!