Update Mac OS via Agent Procedure
These agent procedures allow you to run all system updates for your Mac OS X endpoints.
It will scan for all available updates and then install them all. It might take a long time depending on how many updates are pending.
The updates will not take effect up until the machine is restarted, which is not part of the script so that you can schedule it at your most convenient time.
Edit (03/25/19): The procedures with reboot have been removed due to a boot loop issue, reboot will need to be scheduled outside of this procedure.
Mac OSX Update has no reviews.
So far I've tested this on a few Macs, and they are constantly rebooting now.
To perform system updates, add option --include-config-data to both of the softwareupdate commands (reboot is required).
To avoid reboot loops, ensure Skip if offline is selected when scheduling.
I also added strategic pauseProcedure() after each executeShellCommand() to ensure ample time allowed to execute properly.