-
-
Save talkingmoose/53a131b2324c0e0945a573dfc3f230f4 to your computer and use it in GitHub Desktop.
| #!/bin/bash | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticCheckEnabled -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticDownload -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticallyInstallMacOSUpdates -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist ConfigDataInstall -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist CriticalUpdateInstall -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool TRUE | |
| exit 0 |
Hello, I tested your commands, they work, we can verify it with "defaults read" commands just behind. However, the values, although correctly modified, are not taken into account by the system and the System Settings switches do not move! I think it needs a command behind to force the changes. I tested "Killall Finder" without success. Does anyone have the answer?
com.apple.SoftwareUpdate is flaged as deprecated by Apple (https://developer.apple.com/documentation/devicemanagement/softwareupdate). Not sure how this affects the App Store setting in com.apple.commerce. I would assume, that the “Install app updates from the App Store” option from the software update UI is now decoupled from the App Store setting. At least, I cannot find anything regarding the App Store at https://github.com/apple/device-management/tree/release/declarative/declarations/configurations.
Can any one please confirm this statement?
@smr1619 Just tested on macOS 12.4.0 using a Jamf Pro policy and it's working as expected.
Have you tested locally to see if it works? Open Terminal and test individual lines. Then test running the entire script locally. Then see what happens when you add it to whatever management server you're using.
And be sure to close System Preferences completely between tests. Its interface won't automatically update.