Does anybody know if this should work on M1 Mac's? I tested it out on one of our M1 Mac's and it went through the prompts, but never restarted to install the update. https://github.com/bp88/JSS-Scripts/blob/master/AppleSoftwareUpdate.sh
It should, but the script is deprecated in favor of a newer one by the same author. They outline both scripts on their WordPress along with screenshots.
Another script worth looking at is https://github.com/Macjutsu/super