In this day and age of mobility connectivity, automating this cumbersome step for some is most welcome. The following are the steps to enable this functionality:
Adding VPN Auto-Triggering
1. Click the Start Menu button and type PowerShell
2. Right-clickWindows PowerShell Desktop App and selectRun as Administrator in the provided sub menu
3. In PowerShell type the following:
Add-VpnConnectionTriggerApplication-Name CANITPRO –ApplicationID C:\Windows\Notepad.exe
NOTE: Be sure to replace CANITPRO with your desired VPN connection and provide the path to your application in the ApplicationID call out
4. Enter Y when prompted to enable auto-triggering of the VPN
5. Next Split tunneling needs to be enabled via typing the following command:
Set-VpnConnection -Name CANITPRO -SplitTunneling $True
NOTE: Split tunneling is enabled to stop Windows from forcing all network traffic to be routed through the auto-triggered VPN. Only data for the application autotriggering the VPN will have its data pass through
6. It is also advised to set an idle disconnection time which can be done via typing the following command:
Set-VpnConnection –Name CANITPRO –IdleDisconnectSeconds 10
NOTE: The VPN will automatically disconnect after 10 seconds after the application has closed. The time value can be changed as required.
7. Once completed, type the following command to confirm auto-triggering is enabled:
Get-VpnConnection -Name CANITPRO
Removing VPN Auto-Triggering
Simply type the following command to remove VPN Auto-triggering from the initially setup application:
Remove-VpnConnectionTriggerApplication -Name CANITPRO –ApplicationID C:\Windows\Notepad.exe
Be sure to enter Y when prompted to confirm the removal.
NOTE: Be sure to replace CANITPRO with your desired VPN connection and provide the path to your application in the ApplicationID call out.
Source: CANITPRO
Related posts
Reviews
SAMSUNG GALAXY S8 PLUS
The Samsung Galaxy S8 Plus is a beautifully crafted smartphone with nearly no bezel, curvaceous in design and reflects a…
How to: Connect to Exchange Online Using Multi-Factor Authentication
Using PowerShell to manage your Microsoft cloud services like Exchange Online and using multi-factor authentication (MFA) separately is awesome. Using…
Stay connected