I'm running the following script as a part of a Microsoft Office deployment.
#!/bin/sh
/bin/sleep 1
/Library/Application Support/JAMF/bin/dockutil --add '/Applications/Microsoft Excel.app' --replacing 'Microsoft Excel'
/bin/sleep 5
/Library/Application Support/JAMF/bin/dockutil --add '/Applications/Microsoft Word.app' --replacing 'Microsoft Word'
/bin/sleep 5
/Library/Application Support/JAMF/bin/dockutil --add '/Applications/Microsoft PowerPoint.app' --replacing 'Microsoft PowerPoint'
/bin/sleep 5
/Library/Application Support/JAMF/bin/dockutil --add '/Applications/Microsoft OneNote.app'
killall -KILL Dock
exit 0
The install policy runs and returns Exit Code 0, but in the end the icons in the Dock have not changed.
So I created another policy that does nothing but run this script and set it to run at recurring check-in. Again the policy logs return Exit Code 0 but the icons have not changed.
However this is where things get really strange. If I flush the log for a device, then manually run jamf policy from Terminal it works as expected.
Has anyone else come across this before?
I'm running dockutil 2.0.5. Clients are Yosemite, El Cap and Sierra.
Post edited to correct jamf recon to jamf policy/