I’m constructing a backup script for Windows 7, and the last action I want it to perform is to safely “remove” the USB drive that it is backing up to. I am under the impression that plugging the drive into the same USB port all the time will keep the same DEV_ID (correct me if I’m wrong). With a command line (or PowerShell), how can I tell Windows to safely remove the hardware automatically without user input?
Just as a place holder, other OSes that may have a way to do this would be great to know as well.
Solution:
RemoveDrive has served me well in the past