Script that asks for device name (ie: en0), SSID, and Password, then makes the connection.
Reason to get this script together: Someone needed to set a headless MacMini on WiFi networks when he was on the road.
The offered solution given was to install rustdesk (https://rustdesk.com) on the MacMini, and set it to automatically connect to his phone hotspot. In addition to that, the iPad also needed to have RustDesk install, so he could be able to connect to the MacMini and set the those on the road WiFi networks that way.
This script is an additional option, if manipulating the desktop remotely via the iPad were conversome, or if desconnected before inputing the on the road Wi-Fi password.
That's it.