Wondering if there is a way to programmatically do something close to this process.

The main steps are:

  1. Backup computer. This can be done with standard stuff I imagine.
  2. Deauthorize accounts. This may be tricky but I think it can also be programmatically done.
  3. 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.
  4. Erase partition/disk. Basically, do stuff programmatically while in debug mode during startup. Wondering if this is possible to do programmatically.
  5. Re-install the latest MacOS. Same here.
  6. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.