csrutil disable
Restart computer
In the terminal, type
sudo open /Applications/TextEdit.app /System/Library/LaunchDaemons/com.apple.ManagedClient.enroll.plist
change
<key>com.apple.ManagedClient.enroll</key>
<true/>
to
<key>com.apple.ManagedClient.enroll</key>
<false/>
So that the changes take effect
@DaWallyLama and @RyanPlant these instructions are out of data for newer versions of macOS. More current instructions may be found here.
I followed similar steps myself on a machine over 6 months ago and it has run flawlessly since then.
What I did was:
gdmf.apple.com
could interfere with future updates.sudo profiles remove -all