The policy you created isn't going to change the User Template, which is why you're seeing the default dock on new users. What you could do is change your trigger to Once per user per computer, which should make the change for any user on that computer.
i just change the execution frequency from
ONCE PER COMPUTER to ONCE PER USER PER COMPUTER
let me see now how this policy behaves.
Has anyone ever used ONCE PER USER PER COMPUTER ??
@dferrara wow, thanks for the response, you clarify what i was thinking.
I didn't see your response until i already made the change in the JSS and posted my comment.
does this also apply for policies that ADD to the DOCK ?
Has anyone actually had any success making the JAMF supplied Dock items work reliably?
I gave up some time ago and went with Dock Util, which once you get around how it works does a really great job.
@tcandela No problem! Yes it should work for adding to the dock as well. If you need more flexibility than what the JSS offers, a lot of us are using dockutil. It requires more work, but once you have the package installed, you can make changes in Terminal and use Casper to run dock scripts instead.
Adding to Dock works for me.
Remember it was not working last time I wanted to use it, tested it an hour ago with some new software distribution policy working on now, and was gladly surprised to find it working as well. Got new icon to the Dock. Seems to be fixed in 9.82
Thanks, JAMF!
What is the best TRIGGER to use when implementing ONCE PER USER PER COMPUTER?
I have my Dock policy set at Recurring check in. Should it be changed to 'Login' as the trigger ?
i'm on 9.81,as per the policy logs, looks to be working for me when removing/adding dock items when implementing ONCE PER USER PER COMPUTER at LOGOUT.
@tcandela I haven't tried Logout, that's good to know. I usually use the Login trigger.
I set my DOCK policy to remove items at LOGIN, looks to be acting weird, some of the dock items I have setup to be removed from the Dock still show up (MAPS,PHOTOS,IBOOKS), and a couple i do not want removed are gone (NOTES,SYSTEMPREFERENCES).
It might be that 9.82 fixed this possible issue that @mhasman mentioned above.
@ Logout, works as expected. @ login does not work correctly,
i'll check out this dockutil
@tcandela It has worked wonders for me, I have it in production now. I couldn't find a single guide on how to use it and set it up, so be prepared for some research. Also, if you are deploying with El Capitan, some of that space is protected now. I have mine installed here:
/usr/local/bin/dockutil
After that, it's just a matter of getting your commands to the dockutil binary right.
I would also have a look at DockUtil it works great and can do everything you want it to check the dockutil github code here, place the python script on the users machine and then write your script in Management Settings to do what you want it to do, run it at login, you should be all good to go.
I do mine at imaging and have it as a ongoing self service script if user's want to get back to their default as such, obviously you can adapt and change it around for your needs:
#!/bin/bash
/path/to/dockutil.py --add /Applications/Self Service.app --position 2 --allhomes
/path/to/dockutil.py --move 'App Store' --position 3 --allhomes
/path/to/dockutil.py --add /Applications/Google Chrome.app --position 4 --allhomes
/path/to/dockutil.py --remove 'Safari' --allhomes
/path/to/dockutil.py --remove 'Mail' --allhomes
/path/to/dockutil.py --remove 'Contacts' --allhomes
/path/to/dockutil.py --remove 'Calendar' --allhomes
/path/to/dockutil.py --remove 'Notes' --allhomes
/path/to/dockutil.py --remove 'Reminders' --allhomes
/path/to/dockutil.py --remove 'Photos' --allhomes
/path/to/dockutil.py --remove 'Messages' --allhomes
/path/to/dockutil.py --remove 'FaceTime' --allhomes
/path/to/dockutil.py --remove 'iTunes' --allhomes
/path/to/dockutil.py --remove 'iBooks' --allhomes
/path/to/dockutil.py --remove 'Maps' --allhomes
I'd rather have JSS dock item policy work @ login, but it acts weird, items i want removed stay, items i want to stay are gone. @ logout works though.
I took a brief look at dockutil on github, so I have to just place a file (python script) on each enrolled mac (/usr/local/bin/dockutil), and then i can issue commands to manipulate the dock ?
@tcandela Yes, exactly. There's also a Feature Request to integrate dockutil into Casper here:
https://jamfnation.jamfsoftware.com/featureRequest.html?id=1982
@tcandela yes exactly. The dockutil script has a function where it adds it to all the user's home folders. you could set a policy that runs it on log in.
@dferrara The Feature request is a must!
@Sachin_Parmar just so i understand correctly your lost post;
are you saying i create a script to do what i want to the dock (parts of your script below), create a policy to run the script , and that function --allhomes -- will set that dock for all current and future users home folders ?
!/bin/bash
/path/to/dockutil.py --add /Applications/Self Service.app --position 2 --allhomes
/path/to/dockutil.py --move 'App Store' --position 3 --allhomes
/path/to/dockutil.py --add /Applications/Google Chrome.app --position 4 --allhomes
/path/to/dockutil.py --remove 'Safari' --allhomes
/path/to/dockutil.py --remove 'Mail' --allhomes
/path/to/dockutil.py --remove 'Contacts' --allhomes
/path/to/dockutil.py --remove 'Calendar' --allhomes
/path/to/dockutil.py --remove 'Notes' --allhomes
dock-master also works well if you want to go the profile route
@tcandela Yes that's correct, it adds it to all current user's of the Mac not future users but you can make a casper policy that effectively run's the dock script as the user either as an ongoing script or "Once per user per computer" execution frequency at Login for future users.
Here's the extract from the --allhomes flag from the dockutil code attempts to locate all home directories and perform the operation on each of them Source
@mhasman what trigger and frequency are you using ? are you both adding/removing dock items ?
@tcandela Trigger? I do not use DockUtil but settings in policy on JSS:

@mhasman yeah I know your using the JSS policy for your dock items. I just upgraded my test machine to 9.82, so I'll see if @ login trigger behaves correctly unlike in 9.81
what trigger (logout, login ?? etc.. ) and frequency (once per computer, once per user per computer.. ?)
are you using for the policy ?
are you both adding/removing dock items ?
Has anyone got dockutil working correctly on Yosemite?
We are not fully upgraded to El Capitan yet and I have tried to add/remove documents from the dock without success. Loggin states items have been added/removed but the result is not correctly visible in the dock.
Even after restart/logout/login.
I did run the script in my test while user was logged in (and the script restarted the dock)
Will try to run at logout to see if this gives better results.
With a policy on the JSS as @mhasman is using is also not giving me the results I want..
@rblaas We are on El Cap but have you tried adding the sleep 30
command before your script runs? Without that command my script usually fails. Also here's an example line:
sudo -u $3 /usr/local/bin/dockutil --remove 'Numbers' --no-restart
Each line has --no-restart
except for the last line.
@dferrara No I have not and will definitely try that.
thanks for the tip