Does anyone have a good method of adding WINS servers to Ethernet, Wi-Fi, and Ethernet Adapters?
Like in the picture below?
I need to add two WINS Servers to our Macs via bash script if possible.
I think I've identified the .plist that this is stored at (/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist), but I'm not having any lucky modifying it.
If the best way to do it is the add it to this plist, I guess I need to insert two values in the WINSServerAddressList key/array:
If you just need to modify that value then a simple:
defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server WINSServerAddressList "192.168.229.2"
Untested as I don't use WINS but that is the command. Might try without the quotes. Good luck.
I was thinking one would have to use PlistBuddy but I believe it can be done with just the defaults command. This is a snippet from a script I used in the past.
defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist WINSServerAddressList -array-add ' <string>192.168.1.11</string> <string>192.168.1.12</string>'
I'm not at my Mac to test it but I did find this page with some searching. Perhaps it can get you headed in the correct direction. I'll be home a little later today and can test a few things out.
I was trying to do this exact thing and finally got it to work adding two with the following syntax
defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server WINSServerAddressList -array "XXX.XXX.XXX.XXX" "XXX.XXX.XXX.XXX"