Programming

Zsh script that can enable FileVault & output decryption key to terminal for Mac devices

Started by Stormcloak_Soldier · Nov 11, 2025

#11944
I need to enable FileVault on ~ 60+ MacBooks remotely through the remote management platform I use. I can access a terminal as root at any time or connect to the desktop with user acceptance. Yes, this is really easy to do when you are in a remote session or physically in front of the machine, but normal users are such a pain to coordinate literally 2 minutes of time with. It's going to take me months of sending Teams messages and being left on delivered over and over until management is involved. This is for a compliance audit we are involved in so I cant shrug it off unfortunately. As I'm the newest member of the team they stuck me with their mess to clean up.

Looking online, all I can seem to find is enabling FileVault using an admin account on the device and a plist file, generating passwords for each machine. This will for sure get messy as some users machines don't have admin accounts on them or the creds are different on the admin account than others. BitLocker has a method to do this so I'm hoping maybe... just maybe... someone here has heard of something or knows of a way I can do this in the terminal.

PowerShell script I have been using for your reference: Enable-BitLocker -MountPoint "C:" -EncryptionMethod XtsAes256 -UsedSpaceOnly -TpmProtector