<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[VPN - evan.ly]]></title><description><![CDATA[A lo-fi collection of things I've ever encountered as a IT Management Consultant / Business Analyst / Human-shaped IT Swiss-Army Knife.]]></description><link>http://evan.ly/</link><generator>Ghost 0.5</generator><lastBuildDate>Tue, 26 May 2026 16:48:52 GMT</lastBuildDate><atom:link href="http://evan.ly/tag/vpn/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Connect VPN Automatically]]></title><description><![CDATA[<p>I created a server that needed to be connected to the VPN at all times. Here's three ways of doing it, but I used the last way - a scheduled task that repeatedly executes every 5 minutes after system start up, meaning if the VPN goes down and then up, it will still reconnect.</p>

<h2 id="applicationbasedtriggeringwindows8">Application based triggering (Windows 8+):</h2>

<ol>
<li>PowerShell: <code>Add-VpnConnectionTriggerApplication [-Name] &lt;string&gt; –ApplicationID &lt;String[]&gt; -PassThru</code> <br>
<a href="http://blogs.technet.com/b/networking/archive/2013/10/02/automatically-triggering-vpn-connections-and-vpn-diagnostics-enhancements-in-windows-8-1.aspx">Source</a></li>
</ol>

<h2 id="quickanddirtywindowsxp">Quick and Dirty (Windows XP+):</h2>

<ol>
<li>Save credentials in VPN connection  </li>
<li>Drag a shortcut to the 'Startup' folder <br>
<a href="http://answers.microsoft.com/en-us/windows/forum/windows_7-networking/how-to-automatically-connect-to-a-vpn-in-windows-7/65d5bbd3-f946-4755-9ac9-943651e0e556">Source</a></li>
</ol>

<h2 id="scheduleatasktoexecuteatsystemstartup">Schedule a task to execute at System Startup</h2>

<ol>
<li>Create a scheduled Task (I had it execute every 5 minutes after start indefinitely for auto-redial)  </li>
<li>Create batch script: <code>rasdial "My VPN Connection" &lt;username&gt; &lt;password&gt;</code> <br>
<a href="http://technet.microsoft.com/en-us/library/cc779544(WS.10).aspx">Source</a></li>
</ol>]]></description><link>http://evan.ly/connect-vpn-automatically/</link><guid isPermaLink="false">a3c1f801-824f-48f0-b777-57fff924172b</guid><category><![CDATA[VPN]]></category><category><![CDATA[automation]]></category><dc:creator><![CDATA[Evan]]></dc:creator><pubDate>Thu, 09 Oct 2014 05:12:47 GMT</pubDate></item></channel></rss>