Last active
December 1, 2020 16:14
-
-
Save jasonslay/10e6cb15b2302c73cfaef862434f2bc4 to your computer and use it in GitHub Desktop.
MDM Migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
SERIAL_NUMBER=$(ioreg -l | grep IOPlatformSerialNumber | cut -d "\"" -f 4) | |
echo "Serial Number: $SERIAL_NUMBER" | |
read -p "Send this serial number to Jason and press ENTER when he confirms the MDM server switch for your machine." | |
# Remove old stuff | |
sudo jamf removeMdmProfile | |
sudo jamf -removeFramework | |
# Get new profiles | |
sudo profiles renew -type enrollment | |
echo "Click on the system notification and allow the profiles to be installed." | |
# Upload FileVault recovery key to MDM server | |
read -p "Press ENTER when the profiles are installed" | |
sudo fdesetup changerecovery -personal -user $(whoami) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment