Wondering if there is a way to programmatically do something close to this process.
The main steps are:
- Backup computer. This can be done with standard stuff I imagine.
- Deauthorize accounts. This may be tricky but I think it can also be programmatically done.
- Start MacBook Pro in recovery mode. This is the first part of my question. If this can be done programmatically. So the user just presses a button and it restarts the computer in recovery mode. Maybe there is a way for the keys ⌘R to be invoked even while the computer is restarted, programmatically somehow.
- Erase partition/disk. Basically, do stuff programmatically while in debug mode during startup. Wondering if this is possible to do programmatically.
- Re-install the latest MacOS. Same here.
- Login for the first time. Perhaps programmatically/automatically fill in some of the fields for user account creation based on the state of the system before reset (like icloud username and account username). Wondering if any of that is possible.
Basically I'm wondering if you can just "press a button" and it will do all this stuff for you, and all you have to do is confirm your desired username and password on startup and you're back to a fresh slate.
If it's not directly possible, maybe it is possible by plugging in some external device and having it maintain some sort of state.