Anyone know how we can turn on(or off) items in the Finder sidebar in a managed way? I tried looking through the forums and mostly find chatter about adding and removing favorites.
first off I would see if you can change the settings you want within config profiles within Jamf, you can turn a few things on and off from there.
secondly, I will link you to a previous thread that has some scripts that edit the com.apple.finder.plist file that will allow for further configuration Finder Settings Script
@mickgrant Thanks but I've explored both configuration profiles that are included with Jamf and have looked through that thread. Both came up empty for me. Under the locations section in the sidebar is the computer setting to turn on whether it shows up there or not. Apple has it off by default but if I can turn it on, it would help solve an issue that is unique to our environment. Apple seems intent on not providing this ability though.
This is in the "Shared File List" in ~/Library/Application Support/com.apple.sharedfilelist settings which unfortunately end up as files created by NSKeyArchiver/NSKeyUnarchiver. You can try and open them like a plist but it's all gibberish. This is the same place and style that Finder saves server favorites in the Command+K window. See more here: https://developer.apple.com/documentation/foundation/nskeyedarchiver, and make sure the language is set to Objective-C.
There is a Python script that supposedly can unpack these here, but I don't really know how you'd pack it back up again. Without writing something in Objective-C specifically using these classes I can't think of any feasible way to open and edit these files.
Wish I had better news.