Also, I put in safety feature to not run the policy unless the Self Service app is running. Applications/"$macOSInstallerPath"/Contents/Resources/startosinstall -agreetolicense -forcequitapps -eraseinstall -newvolumename "Macintosh HD"Įxit actually, if you are interested in my script this one will try the download a few times in case it doesn't complete on the first try (It usually works with removing the plist but I've seen it fail on the first try at least once). # Install macOS 10.15 with the erase drive option.Įcho "Erasing drive and installing macOS Catalina"Įcho "This might take a while usually about 15-20min."Įcho "Once the mac reboots, follow the instructions on screen" Jamf policy -trigger delete_computer_from_jss MacOSInstallerPath=$(ls -t /Applications/ | grep -m 1 Install macOS Catalina)Įcho "Error: Couldn't find macOS Catalina installer"Įcho "Exiting, disk untouched, please try running the script once more" ![]() Abort if we can't find it in the expected place. If ! /usr/sbin/softwareupdate -fetch-full-installer -full-installer-version 10.15.4 Įcho "Error: Failed to download the installer, please try running the script once more" # Download installer exit if the download fails. # Warn the user and give the user a choise to abort.Įcho "This will completly erase your data from the machine."Įcho "Your computer will be fully reset all your data will be erased."Įcho "Are you sure you want to continue, have you backed up all your important files?"Įcho "Downloading installer this might take a while" bin/echo "You need to be root to do this, so use: sudo $ScriptPath/ReInstallmacOSCatalina.sh" Version=$(sw_vers | grep ProductVersion | awk '')Įcho "This will only run on macOS 10.15 Catalina" ![]() ![]() I've created a script to run in order to do a complete wipe of the Mac and a policy to call from the script to remove the device from JSS.įor us it has, so far knock on wood, worked flaw less.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |