Applescript for apfs encrypted volume to get to the password screen


I have an encrypted apfs volume named TEST (path is /Volumes/TEST) and would like an AppleScript that will bring up the dialog box asking for the password. I do not want it mounted, just the dialog box for me to enter password.


I can successfully unmount it with this after entering UUID:

do shell script "diskutil unmount UUID"


If I use the following

do shell script "diskutil apfs unlockvolume UUID"


I get this error:


Thanks


iMac (2017 – 2020)

Posted on Dec 27, 2025 11:43 PM

Reply

There are no replies.

Applescript for apfs encrypted volume to get to the password screen

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.