Disable Device Enrollment Program (DEP) notification on macOS Monterey

PHOTO EMBED

Tue Sep 13 2022 04:21:04 GMT+0000 (UTC)

Saved by @jmbenedetto #bash

0. Reboot to Recovery Mode by holding `command-R` during restart

1. Open Utilities → Terminal and type
```
$ csrutil disable
$ reboot
```

4. After rebooting in normal mode, open Terminal, and type
```
$ cd "/etc"
$ echo "0.0.0.0 iprofiles.apple.com" >> hosts
$ echo "0.0.0.0 mdmenrollment.apple.com" >> hosts
$ echo "0.0.0.0 deviceenrollment.apple.com" >> hosts
$ echo "0.0.0.0 gdmf.apple.com" >> hosts
```

5. Reboot to Recovery Mode by holding `command-R` during restart and type
```
$ csrutil enable
$ reboot
```

4. After rebooting in normal mode, open Terminal and type the code below to verify verify the DEP status
```
$ profiles status -type enrollment
Enrolled via DEP: No
MDM enrollment: No
```
content_copyCOPY

https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd