I have a device with Cellular & WiFi, but I prefer the Cellular to be my first prior connection and WiFi as secondary.

So I need a script which can trigger whenever Cellular is not able to ping my production IP. It should switch to my WiFi network automatically or else, maybe it can disable WiFi if found that there is an active cellular connection and to enable back my WiFi if the Cellular found is inactive.

closed as too broad by Scott, Ramhound, Máté Juhász, fixer1234, Pimp Juice IT Dec 8 at 17:12

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Hi zx485 , i almost create the script but currently i dont have clue on how to find event id whenever my Cellular is disconnected so that i can create a task using task scheduler in order to Disable WiFi whenever it trigger the event of Connection and to trigger whenever my Cellular is connected it will trigger back and to Enable back the WiFi when my cellular is disconnected. – Sharron Saint Dec 9 at 13:13