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 Manager (ABM) or Apple School Manager (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 Enrolment (ADE) workflows without erasing the disk.
This script tweaks a whole lot of things that Apple never intended you to mess around with, so use it at your own risk and make sure you read, and heed, the warnings over on the Github page, which I have copied below.
https://github.com/Inetum-Poland/add2abm
Warning
End users should never run this script themselves.
Caution
Do not use this script on a Mac with User Activation Lock enabled or one already added to ABM/ASM.
Caution
Do not proceed beyond the Select Your Country or Region screen