I am wanting to ensure the main company SSID is always the topmost one and hence the one tried first. I have found several previous discussions here as per the following.
https://www.jamf.com/jamf-nation/discussions/17858/wifi-preference-editing-script
https://www.jamf.com/jamf-nation/discussions/18223/re-order-wifi-preferred-networks
The first one seems to work by deleting and re-creating the SSID to cause it to be re-added to the top. The second one seems to work by editing the plist defining the list of SSIDs. Each has problems.
The recreation of an SSID only works if the credentials of the SSID are available to the script, in our case the one we want listed first uses WPA2 Enterprise authentication with a username and password for each individual and hence this is not going to be possible to include in the script.
The editing of the plist visually appears to work in that the list is reordered as desired and displayed accordingly in Network in System Preferences. The problem is that the Mac does not seem to obey this change because even after a reboot it auto reconnects to the previous choice that is our guest network and does not as intended use the choice based on the order in the list.
I believe the plist that is involved is
/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
My guess is that the section that lists the SSIDs and their order has been edited by the script but maybe a different section defining either the last SSID used or the one to default to is not.
Is anyone able to suggest a solution?
