I am having issues on my Asus F555UB-Laptop with the WiFi. As a workaround I have written a shell script that restarts the Wifi Adapter
#restart network adapter Disable-NetAdapter -Name WLAN -Confirm:$false Enable-NetAdapter -Name WLAN -Confirm:$false
However, it needs more automization. Because right now I have to execute the script myself when the signal is lost. It would be great if the script gets triggered when the WiFi gets disconnected, and after restarting the adapter it should automatically reconnect to an available WIfi I have a password stored for. So my Questions are:
How can I trigger the script to run on a "lost wifi signal event"?
How can I automatically connect to my Wifi?