Created
July 21, 2023 13:13
-
-
Save oliverlabs/f86f990c82be8d9c05962f42f005be27 to your computer and use it in GitHub Desktop.
This script triggers the built-in Windows VPN client and auto-connects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rasphone "<INSERT-YOUR-VPN-CONNECTION-NAME>" | |
$wshell = New-Object -ComObject wscript.shell; | |
$wshell.AppActivate('Network Connections') | |
Sleep 2 | |
$wshell.SendKeys('~') | |
Sleep 2 | |
$wshell.SendKeys('~') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment