Skip to main content
Question

Apply System Updates during enrollment?

  • March 6, 2019
  • 1 reply
  • 9 views

Forum|alt.badge.img+9

This is more of an idea seeking question.
How do you guys handle System Updates from Apple on new enrolling devices?

We currently have a script snipped in place that actually only does an softwareupdate -i -a.

But I wonder if there is a more elegant way doing this?

1 reply

Forum|alt.badge.img+11
  • Valued Contributor
  • March 6, 2019

I do pretty much the same thing but since the systems in the environment I support are mixed in terms of OS. I use the below command.

Update: I should have added I run this as a script as the very last step of new systems.

#!/bin/bash

osvers=$(sw_vers -productVersion | awk -F. '{print $2}')

if [[ ${osvers} -lt 13 ]]; then
    softwareupdate --install --all

elif [[ ${osvers} -ge 13 ]]; then
    softwareupdate --install --all --restart
fi