Ejecting recalcitrant USB disks

I’ve got a couple of USB SATA caddies that I often have problems with when I try to remove them safely to switch them off. The disks in them are seen by the system as fixed drives, and the System process (pid 4) often opens some system files (in the $extend folder) on them that prevent the USB device being removed. Because they are seen as fixed drives there’s no Eject option in Explorer.

I’ve finally discovered how to eject them safely. Open Disk Management (either through Control Panel, or just running diskmgmt.msc) and set the disks to be offline by right clicking on the disk name in the lower panel. Then they can be ejected. The only problem is that they will remain offline, so you need to make them online again before they can be used next time.