Skip to content

Instantly share code, notes, and snippets.

@icalvo
Created November 15, 2021 07:59
Show Gist options
  • Save icalvo/38bbf4a14fd25f7211e88877624aceae to your computer and use it in GitHub Desktop.
Save icalvo/38bbf4a14fd25f7211e88877624aceae to your computer and use it in GitHub Desktop.
Restart Cisco AnyConnect VPN Client
@ECHO OFF
@REM taskkill without /f so that the icon is removed.
taskkill /im vpnui.exe
net stop vpnagent
net start vpnagent
@REM vpn_credentials.txt should have two lines, first with the username and second with the password.
"C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe" connect rackspace-vpn.frontiersin.net -s < vpn_credentials.txt
START "" "C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment