I have an iMac lab, all the machines of which were purchased through DEP. They were prepped before we had Jamf, and we're now getting around to wiping them and taking advantage of PreStage Enrollment. I used startosinstall and --eraseinstall to wipe these, and it worked great. Additionally, all the machines have been PreStaged.
However, to my horror, I'm finding that PreStage Enrollments do not appear to be possible with my method of --eraseinstall. I know this because I've clicked through a number of them without seeing my beloved "Remote Management" step. Then I booted one into Recovery, wiped it manually, and—voilà —there's the "Remote Management" step.
Any ideas on why --eraseinstall wouldn't erase a partition thoroughly enough to allow a PreStage Enrollment to occur? Below is the exact command used. The only thing I can think of is that I used a USB installer instead of an /Applications installer, but I'm not sure how that would initiate a less complete erase.
"/Volumes/Install macOS Mojave/Install macOS Mojave.app/Contents/Resources/startosinstall"--eraseinstall --newvolumename "Macintosh HD" --agreetolicense
