Simple update reminder for Jamf

On recent versions of macOS, reminding the user to update using Apple’s Software Update dialog in System Preferences is often preferable to other update strategies. There are several ways to do it. One well-known solution is Nudge, which works well, but may be a bit too comprehensive for some.

If you, like me, prefer simple solutions based on Jamf’s existing toolset – look no further. I created a very simple solution based on jamfHelper: SimpleNudge.sh – only 15 lines of code.

Remind users to update using this simple setup

To set up:

  1. Upload SimpleNudge.sh under Computer Management – Scripts
  2. Create a Smart Computer Group called Has Apple Software Updates Available, with the Criteria Number of Available Updates being more than 0
  3. Create a Policy to run on Recurring Check-in Once every day (probably most effective, but you may choose another interval, according to preference) with the Smart Computer Group created above as its Target under Scope
#!/bin/zsh
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
description="Your Mac has important operating system updates available."
button1="See Updates"
icon="/Library/Application Support/YourCompany/yourlogo.png"
title="Update Notification"
heading="Please Update macOS"
"$jamfHelper" -windowType utility -description "$description" -title "$title" -heading "$heading" -button1 "$button1" -icon "$icon"
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
sudo -u "$loggedInUser" open "x-apple.systempreferences:com.apple.preferences.softwareupdate"
view raw SimpleNudge.sh hosted with ❤ by GitHub
SimpleNudge.sh

You should combine this policy with a priority daily policy to update inventory on all managed clients. You may want to edit the Smart Computer Group so it also requires that you run Monterey or more recent, if you use a different update strategy for older versions of macOS. If you want your company’s logo in the dialog box, you need to pre-deploy it and specify its’ path under icon= in SimpleNudge.sh.