How to schedule a task that is triggered only when specific network interface is up?

Discussion in 'Windows 10' started by DirtyAngelicaSecured, Sep 7, 2021.

  1. DirtyAngelicaSecured

    Mar 30, 2020
    101
    17
    10
    I am testing VPN software update that has a few bugs in it, but until developers fix those bugs, all issues can be mitigated by running a custom script. The problem is with automating the process because the script can only run correctly when a specific VPN network interface adapter is up. After a reboot, the needed network interface adapter is not available up until it loads, which is usually about 10-15 seconds after rebooting into Windows 10 OS.

    I can create a scheduled tasks that runs the needed script 15 seconds after reboot, but that is not ideal. The ideal way would be to have task scheduler execute the script only when and as soon as the needed interface adapter loads. I don't want a specific delay-after-boot to be the trigger that loads the script. General WLAN/LAN connection and/or non-VPN interface adapter availability cannot be the trigger because the script must be executed only when the VPN-specific interface adapter is up.

    Is it possible to do with Task Scheduler or do I need some other scheduling software? I don't know programming or scripting. The script that needs execution is a very basic PowerShell script with a few commands that can be found online, but they get the job done!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...