Skip to content

Instantly share code, notes, and snippets.

View fergie's full-sized avatar

David Ferguson fergie

View GitHub Profile
@fergie
fergie / CiscoVPNAutoLogin.ps1
Created September 27, 2017 13:22
PowerShell script to automate the Cisco AnyConnect SSL VPN client on Windows
# Source www.cze.cz
# This script is tested with "Cisco AnyConnect Secure Mobility Client version 3.0.5080"
# Run using %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\CiscoVPNAutoLogin.ps1"
# VPN connection details
[string]$CiscoVPNHost = "vpn.example.com"
[string]$Login = "username"
[string]$Password = "password"
[string]$vpncliAbsolutePath = 'C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe'
@fergie
fergie / anyconnect.scpt
Last active November 6, 2015 12:27 — forked from andrewh/anyconnect.scpt
Applescript to automate the Cisco AnyConnect SSL VPN client on OS X Mavericks
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Apple Script Editor
-- (Or export to .app to run from spotlight.)
-- 2. Substitute "vpn.example.com" and "REDACTED" for your VPN server and password
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility
-- 4. Enable Script Editor (or this .app if so exported)
-- 5. Trigger script from the menu (or run from spotlight)
-- 6. Enjoy being connected
-- 7. Run script again to close connection