Manage favorite servers in macOS with a script

You can pre populate the list of favourite servers in the macOS / OSX “Connect to network server” window in finder, with the new(ish) sfltool..

sfltool add-item -n "Friendly Name" com.apple.LSSharedFileList.FavoriteServers "smb://server.address/Share"

You’ll find that if you repeatedly run the command, you get duplicates added, so I clear the list first with

sfltool clear

Leave a Reply

Your email address will not be published. Required fields are marked *