I'm running this script from a policy in Jamf.
#!/bin/sh defaults write com.apple.Dock contents-immutable -bool true; killall Dock
It does not do anything. However, if I run it locally from Terminal, works like a charm. Any thoughts? What I am doing wrong or forgetting?
Open one of the applications you want to always be in the dock, and right click on its dock icon.
Toggle “Keep in Dock” to on in the Options menu.
Open Terminal OneVanilla Login
In the terminal window type: defaults write com.apple.dock contents-immutable -bool true. Then type: killall Dock.