Skip to content

RAS\_CreateVPNConnection

VB Scripting Library > RAS (Remote Access Services) functions

Creates a VPN connection

RAS_CreateVPNConnection(sConnectionName, sIPAddress, sVPNType) As Boolean

sConnectionName (String)

A friendly name for the connection

sIPAddress (String)

IP address (such as microsoft.com or 157.54.0.1)

sVPNType (String)

Type of VPN. Can be PPTP, L2TP, IPSEC or Automatic

VBScript

If bStatus Then bStatus = RAS_CreateVPNConnection("ACME VPN", "127.0.0.1", "Automatic")

Scripting Guidelines

RAS_IsRasInstalled RAS_GetConnectionPath RAS_SetTCPIPProperties RAS_SetUIProperties RAS_SetVPNSecurityProperties RAS_DeleteConnection