Giter Club home page Giter Club logo

cisco_anyconnect_script's Introduction

CUHK(SZ) VPN script (For Windows)

主要功能:一键连接vpn (Cisco anyconnect),免输密码

Ref: Github.Cisco_anyconnect.ps1@jhorsman

Component:

connect.cuhksz.ps1

disconnect.cuhksz.bat

Prerequisites:

  1. Already succesfully connect to CUHKSZ VPN once, if not, please refer to VPN Section in ITSO-CUHKSZ. | 曾经配置过CUHKSZ VPN。若第一次使用,请参考ITSO-CUHKSZ中VPN配置一栏。

  2. Already installed Powershell | 已经有Powershell

  3. Already setup Powershell script execution permission(Optional) | 已经配置好Powershell脚本运行权限(可选)

    Maybe you'll encounter problem like:	
    "cannot run activate.ps1 because running scripts is disabled on the system" 
    Solution:
    Use admin to run Powershell, type "set-ExecutionPolicy", press Enter;
    Then type "Y", press Enter.
    Done.
    
    也许你会遇到这样的报错:
    "无法运行***.ps1,因为在此系统中禁止执行脚本。"
    解决方案:
    以管理员身份运行Powershell, 执行命令set-ExecutionPolicy RemoteSigned,再按Y即可。
    
    本步骤只需要在第一次配置时运行。
    

    Reference

  4. Edit connect.cuhksz.ps1, replace model as your personal info. | 修改connect.cuhksz.ps1 中的line12, line13 ,将其改为你的学号和密码。

    param (
      [string]$Server = $( "vpn.cuhk.edu.cn" ),
      [string]$Group = $( "0" ),
      [string]$User = $( "120000000" ),
      [string]$Password = $( "MyPassWord" )
    )
    

    Change the template "120000000" to your student number and the template "mypassword" to your password. Save it. | 将模板“120000000”改为你的学号,将模板“Mypassword”改为你的密码,保存。

  5. Confirm that your Cisco anyconnect is installed at the following address: | 确认你的Cisco AnyConnect是否安装在以下地址:

    [string]$vpncliAbsolutePath = 'C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe'
    [string]$vpnuiAbsolutePath  = 'C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe'
    

    The above is the general default installation address. If not, please modify it in time. | 上为一般默认安装地址。若不是,请及时修改。

How to run?

You can put connect.cuhksz.ps1 disconnect.cuhksz.bat anywhere like on the desktop.

你可以把connect.cuhksz.ps1 disconnect.cuhksz.bat放在桌面等任意位置。

Connect | 连接:

Right click connect.cuhksz.ps1, click "run with PowerShell" to complete the connection.

右键connect.cuhksz.ps1 ,点击”使用Powershell运行“即可完成连接。

Disconnect | 断开:

Double click disconnect.cuhk.bat.

直接双击disconnect.cuhksz.bat

cisco_anyconnect_script's People

Contributors

milkmilk233 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.