Best way to install Apple Update to the user without interaction

jamest
New Contributor

Best way to install Apple Update to the user without interaction. I want to have a script to run off hours so that when they user comes in the office in the morning the updates are installed, I was thinking create the pkg through Composer then push it out to the users after hours

3 REPLIES 3

thoule
Valued Contributor II

If you don't like your users, you can kick off Software Update in a policy -> Files & Processes -> Execute command:

/usr/sbin/softwareupdate -ia

Or just run the Software Update section of a policy! If a reboot is required, you should reboot as well.

If you do like your users, or at least want them to like you, you're going to need to see if updates are available and prompt them to quit applications and install.

alexjdale
Valued Contributor III

You will need to take into consideration that some updates require a restart, and if you don't restart then some apps will have problems and performance will suffer. Users generally prefer to have some say in this process, since a forced restart overnight can cause lost work or data corruption.

We have a daily pop-up that runs for a week, allowing users some control over when they update (they can always update at will through the App Store, too). It warns them that at a certain date the updates will be installed no matter what, and they get a 15-minute window to close apps and save files before a restart is forced (if one is required).

thoule
Valued Contributor II

One option is to use an Extension attribute to create a smart group of users who need updates (if count of updates is > 0).

    AppleUpdates=`defaults read /Library/Preferences/com.apple.SoftwareUpdate LastRecommendedUpdatesAvailable`
    echo "<result>$AppleUpdates</result>"

Then you can use a policy to nag the user to install.