We have a policy that uses the Software Updates payload to force users to install macOS updates. By default it's set to run once a month, so users get prompted to install updates, but sometimes there aren't any updates to install. So it pesters users for no reason.
Ideally, I'd prefer that the policy check for available macOS updates, and only prompt the user if updates are available. Is anyone already doing this? If so, how?
If there isn't an existing solution, I'll try and create my own. I've been thinking about how to best accomplish this.
Perhaps using two policies, like so:
Policy #1 would run daily and check for updates using whatever method works (perhaps this):
softwareupdate -l
If Policy #1 finds an update, it would use a custom trigger to run policy #2, which would force an update using the Software Updates payload. (I would allow users to defer it for x days, (where x is a number chosen by our security team).
Advice (and constructive criticism) welcome and appreciated.