How to eject device

hello, my backup runs at night and I eject the external drive in the morning.
Would someone be so kind as to put me on the right track to create an eject device macro.
thanks very much

1 Like

You can eject a volume using AppleScript as described here:

Thank you. The apple script works fine.
Would you know by any chance if force eject and the attached message can damage the external drive or key? can I just ignore it?