Add2ABM is a macOS recovery-time utility script created by Inetum Poland that re-triggers Setup Assistant to allow an already configured Mac to be added to Apple Business[1] (formerly Apple Business Manager[^2], ABM) or Apple School Manager[^3] (ASM) without erasing the disk.
It temporarily removes the .AppleSetupDone flag, as well as local user records on the Data volume, working around the limitations introduced in macOS Sonoma, forcing the system to present Setup Assistant on next boot. This allows the device to be (re)assigned in ABM or ASM for Automated Device Enrollment (ADE) workflows without erasing the disk.
The process is fully reversible: running the script again restores the original system state.
This tool is intended exclusively for system administrators, support engineers, or help desk personnel responsible for managed macOS environments.
It is used to:
[!WARNING] End users should never run this script themselves. The entire procedure should be carried out by, or at least under the supervision of, IT/support staff. Improper use may lead to system misconfiguration. While no data is deleted and all changes are reversible, a full backup before use is of course recommended.
[!CAUTION] Do not use this script on a Mac with User Activation Lock enabled or one already added to ABM/ASM. Proceeding will inevitably lead to assignment failure which can put your data at risk.
In fact, if for whatever reason the assignment fails, do not use Shut Down button in the bottom right corner of the Setup Assistant. Doing so will reset the activation status of the device and will initiate Erase All Contents & Settings system wipe on next boot, even if you’d try to go straight to Recovery. Use Command+Q (⌘Q) and then Shut Down in modal window instead, or just hold the Power button to power off and potentially try again.
The script has additional checks to prevent putting your data at risk, but you’re the one in control.
ABM/ASM assignment error examples
Activation Lock:
Desc. : Provisional Enrollment failed. Sugg. : The device failed to request configuration from the cloud. Domain : DEPCloudConfigErrorDomain Code. : 0x80EF (33007) Domain : MCCloudConfigurationErrorDomain Code. : 0x84D0 (34000)Already assigned:Desc. : Provisional Enrollment failed. Sugg. : This device is already enrolled in the Device Enrollment Program. Domain : DEPCloudConfigErrorDomain Code. : 0x80EF (33007) Domain : MCCloudConfigurationErrorDomain Code. : 0x80FA (33018)Network issue:Desc. : Transport could not connect. Domain : Catalyst.error Code. : 0xCA (202) Desc. : Broadcast primitives invalidated Domain : DeviceManagementTools.error Code. : 0x1E (30) Desc. : Client Disconnected Domain : DeviceManagementTools.error Code. : 0x5B (91)[!CAUTION] Do not proceed beyond the Select Your Country or Region screen when Setup Assistant appears after running Add2ABM. Proceeding further may result in: - duplicate or conflicting configurations, - unexpected behavior on an already configured system.
The sole purpose of re–triggering Setup Assistant is to allow ABM/ASM assignment, not to reconfigure the system.
[!NOTE] Re–triggering the Setup Assistant resets end user’s consent to macOS Software License Agreement (Terms and Conditions step). Add2ABM re–confirms it again in Restore mode.
Run from macOS Recovery only:
sh
sh <(curl -s add2abm.wlst.co/main.sh)
some of our Macs have “Mac HD” instead of “Macintosh HD”, in those cases use:
sh
sh <(curl -s add2abm.wlst.co/mac-hd.sh)
The script is fully interactive and prompts before making any changes.Running the script from a logged–in macOS session is not supported.
[!TIP] For security reasons, before executing the script you can verify its checksum by running
sh curl -s add2abm.inetum.zone|md5 curl -s script_hosting_fqdn/add2abm|md5orsh curl -s add2abm.inetum.zone|sha256 curl -s script_hosting_fqdn/add2abm|sha256You can find the latest script checksums in Releases.
See Add2ABM in action 🎬
The script operates in two modes:
Backup mode (default):
Backs up eligible local user records (*.plist → *.bak) in /var/db/dslocal/nodes/Default/users/,
Removes .AppleSetupDone file located in /var/db/
Performs a reboot to trigger Setup Assistant on next boot
Restore mode (when backups exist):
Restores user records (*.bak → *.plist)
Recreates .AppleSetupDone
Removes .AppleSetupTermsOfService to re–confirm macOS SLA
Performs a reboot to return the system to normal operation
sudo profiles renew -type enrollment (local admin account context required) in Terminal to force Automated Device Enrollment workflow from your MDMIf the script does not behave as expected, you can enable tracing to run it in a verbose mode for debugging:
sh
sh -x <(curl -s add2abm.inetum.zone)
or if you’re hosting it yourself:
sh
sh -x <(curl -s script_hosting_fqdn/add2abm.sh)
Before reporting issues, verify that: - the script was run from macOS Recovery - the Data volume was successfully unlocked
When reporting issues, include: - Mac model and architecture - macOS version - What troubleshooting steps you’ve already taken - Any relevant error messages or unexpected behavior observed - Full Terminal output, if possible
Contributions are welcome! To contribute, create a fork of this repository, commit and push changes to a branch of your fork, and then submit a pull request. Your changes will be reviewed by a project maintainer.
Contributions don’t have to be code; we appreciate any help in answering issues.
Add2ABM was created by the Apple Business Unit at Inetum Polska Sp. z o.o.
Add2ABM is licensed under the Apache License, version 2.0.
To learn more about adding devices using Apple Configurator to Apple Business, visit the Apple Business User Guide (currently available in a limited set of languages). [^2]: To learn more about adding devices using Apple Configurator to Apple Business Manager, visit the Apple Business Manager User Guide. [^3]: To learn more about adding devices using Apple Configurator to Apple School Manager, visit the Apple School Manager User Guide. ↩