So we are planning on rolling out Office 2016 to our campus soon and we are going to be giving users the option to install 2016 alongside 2011 for the time being. Once they are happy with 2016, they can run the uninstaller we have in Self Service.
The issue I am having is that the only way for a dock icon to be removed using the JSS is if the dock icon name matches the application name. This is a problem because the JSS doesn't let you add duplicate dock icons.
For example, I need to have
Microsoft Word - file://localhost/Applications/Microsoft%20Office%202011/Microsoft%20Word.app/
and
Microsoft Word - file://localhost/Applications/Microsoft%20Word.app/
But this is not possible in the JSS. So I gave dockutil a try and the only way to remove individual icons is to removing using the generic name. If I change the name from "Microsoft Word" to "Microsoft Word 2011" it no longer removes when I use the remove dock icon option in the JSS policy.
dockutil --remove 'Microsoft Word'
Which will remove both 2011 and 2016.
If a user has all the icons from 2011 and 2016 in their dock, and they run the uninstaller script, I want the 2011 icons removed, not the 2016.
Any suggestions?

