@EUC-Admin The macOSUpgrade script hasn't ben updated in a while. The more common script these days is https://github.com/grahampugh/erase-install (ignore the name, it does updates as well). There is a section in the Wiki on how to use with Jamf Pro: https://github.com/grahampugh/erase-install/wiki/8.-Use-in-Jamf-Pro
Hey! Thanks for the reply I'll give this script a shot.
#!/bin/bash
# Pulls the current logged in user and their UID
currUser=$(ls -l /dev/console | awk '{print $3}')
currUserUID=$(id -u "$currUser")
fvPass=$(
# Prompts the user to input their FileVault password using Applescript. This password is used for a SecureToken into the startosinstall.
/bin/launchctl asuser "$currUserUID" sudo -iu "$currUser" /usr/bin/osascript <<APPLESCRIPT
set validatedPass to false
repeat while (validatedPass = false)
-- Prompt the user to enter their filevault password
display dialog "Enter your macOS password to start the macOS upgrade" with icon file "System:Library:CoreServices:CoreTypes.bundle:Contents:Resources:FileVaultIcon.icns" default answer "" buttons {"Continue"} default button "Continue" with text and hidden answer
set fvPass to (text returned of result)
display dialog "Re-enter your macOS password to verify it was entered correctly" buttons {"Continue"} with icon file "System:Library:CoreServices:CoreTypes.bundle:Contents:Resources:FileVaultIcon.icns" default answer "" default button "Continue" with text and hidden answer
if text returned of result is equal to fvPass then
set validatedPass to true
fvPass
else
display dialog "The passwords you have entered do not match. Please enter matching passwords." with title "FileVault Password Validation Failed" buttons {"Re-Enter Password"} default button "Re-Enter Password" with icon file "System:Library:CoreServices:CoreTypes.bundle:Contents:Resources:FileVaultIcon.icns"
end if
end repeat
AppleScript
)
##Heading to be used for jamfHelper
heading="Please wait as we prepare your computer for macOS Monterey..."
##Title to be used for jamfHelper
description="
This process will take approximately 20-30 minutes.
Once completed your computer will reboot and begin the upgrade which can take an additional 15-20 minutes."
##Icon to be used for jamfHelper
icon=/Applications/Install\\ macOS\\ Monterey.app/Contents/Resources/InstallAssistant.icns
##Launch jamfHelper
/Library/Application\\ Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType fs -title "" -icon "$icon" -heading "$heading" -description "$description" &
jamfHelperPID=$!
##Start macOS Upgrade
echo $fvPass | /Applications/Install\\ macOS\\ Monterey.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction --user $currUser --stdinpass --pidtosignal $jamfHelperPID >> /var/log/startosinstall.log 2>&1 &
exit 0
Appreciate the insight. I'm trying the above now and it seems to be going somewhere.
If it breaks anything I'm trying what you suggest as a follow up.
@EUC-Admin The macOSUpgrade script hasn't ben updated in a while. The more common script these days is https://github.com/grahampugh/erase-install (ignore the name, it does updates as well). There is a section in the Wiki on how to use with Jamf Pro: https://github.com/grahampugh/erase-install/wiki/8.-Use-in-Jamf-Pro
@sdagley would it make sense to bundle these within the same policy or separate the two.
One policy to pull down the installer while the other executes the erase to install via self service?
Highly recommend following the process recommended by @sdagley it works cleanly as well as on M1 Apple devices as well.
I will say that on the M1 it still asks for a password but you do not need admin its just the end users account.