Add Server to Connect to Server Dialog Login / Self Service script

djdavetrouble
Contributor III

I have been using this with a login / self service trigger to add servers to the connect to server dialog.
just place the server address in Parameter 4 of your policy. If your share name has spaces in it, you must use %20. You can edit it and use two parameters if you like pretty server names. I don't remember why I needed the sleeps but they made it work better at the time.

#!/bin/sh
sleep 10
/usr/bin/sfltool add-item -n "$4" com.apple.LSSharedFileList.FavoriteServers "$4" > /dev/null 2>&1 && sleep 2
0 REPLIES 0