In-Place macOS Sierra Upgrade Script

New Contributor III


I am trying to follow this guide from JAMF:

I am using the script noted here:

I got everything else working so far (you do need another policy to place the .dmg in the applications folder that the article neglects to tell you). I would like the script to force the restart instead of being "soft". I tested it and found that any open application will stop the upgrade.

Just need it to forcibly and immediately preform the restart.


Here is the script:

/Applications/Install macOS --applicationpath "/Applications/Install macOS" --volume $1 --rebootdelay 30 --nointeraction
killall "Self Service"
126 REPLIES 126

Contributor II

@Rosko thanks very much for your help with this. I am starting back from scratch with the Sierra build and letting it go through the script to see what I can collect. I'll reply with what I find.

Contributor II

@Rosko I found something in my install.log that hints at an issue with the targeted drive. Basically I am half completing the script and it upgrades to High Sierra but never converts to APFS (and finishes wiping the drive etc). The same situation as this post:

I should also mention that I am running a bootcamp partition as these lab computers have the option to dual-boot into Windows if chosen.

Valued Contributor

Is there a blog or wiki that explains how create a policy to use the script created by @Rosko ?

I forgot if the Self Service policy should include a "Restart Options" or a restart by way of "Files and Process > Excute command". Or is the reboot already a function of



Release Candidate Programs Tester

@alex030cc What directory did you place your launch agent in? I have FV2 Encrypted Macs and am looking to get this going with @Rosko 's script.

New Contributor II

@RLassus take a look at @Rosko 's Script shared on Github. He already implemented the LaunchAgent to his script. He uses the general "/Library/LaunchAgent/" path. But this will not matter. You can launch it from any path. However, use the provided script will be the easiest way.

New Contributor II

Just a quick note to say that when installing 10.12.6 via script to startosinstall in older versions(up to10.12.3) it had the --volume entry in the script which if removed makes the script work with Sierra 10.12.6. i.e.
startosinstall --volume / --applicationpath
change to
startosinstall --applicationpath
Had me fooled for a while.

New Contributor

Thank you @Rosko for the effort and support you are putting into your script.

I am in the process of trying to deploy High Sierra via Self Service and was stuck for the longest time putting in the user variables.

It turns out, every time I tried to put in /Applications/Install macOS High in variable $4, the JSS would give an error and tell me to check the logs. Checking the logs, I find:

QueryException: Data too long for column 'parameter_1' at row 1

I presume this is MySQL barking at me.

Sure enough, if I put in a shorter path it works.

I am now trying it with the string hard-coded into the script.

Anybody else have issues with the user variables?