Windows 10 VPN Reconnect Automatically

Posted on

There are some features that Windows 10 doesn’t have by default, but are possible to achieve through other ways. We’re going to use the Windows Task Scheduler to schedule rasdial.exe or rasphone.exe, depending on your preference, to run whenever the VPN reports Event ID 20226. 

Click Start search for Task Scheduler. (If nothing shows up, I’d suggest you read this article about Slow Windows 10 Search.)

Once Task Scheduler is open, click Create Task in the right sidebar (>).

Choose a name for it, VPN Reconnect is what I use. Click Change User or Group and write in your Windows username in the field (do this every time you edit the task). Also make sure everything else is like the image.

Windows 10 VPN Reconnect Automatically create task

Click the Triggers tab and click on New and enter the settings from the image below.

Windows 10 VPN Reconnect Automatically trigger

Now go to the Actions tab, click on New, and fill out the form with this information.


Windows 10 VPN Reconnect Automatically action

VPN: VPN connection name

USER: VPN username

PASS: VPN password

If you don’t want to leave your password in plain sight, use these settings.

Note: You will need to click on Connect, it won’t reconnect automatically.

Windows 10 VPN Reconnect Automatically action-rasphone

VPN: VPN connection name

Next is the Conditions tab.

Windows 10 VPN Reconnect Automatically conditions

If it’s successful, whenever your VPN disconnects, it will automatically reconnect, or you’ll see this window, where you’ll have to click on Connect.

Windows 10 VPN Reconnect Automatically vpn connect

Founder of

1 thought on “Windows 10 VPN Reconnect Automatically”

  1. It really works. On my virtual Windows 10 it started reconnecting 2-3 seconds after I disconnected VPN and reconnected in no time. Awesome!

Leave a Reply

Your email address will not be published. Required fields are marked *