Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

VpnConnection class

The VpnConnection class represents the profile of a virtual private network (VPN) connection.ThirdPartyVpnConnection is derived from VpnCommonConfig.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

[ClassVersion("1.0.0")]class VpnConnection : VpnCommonConfig
{
  boolean AllUserConnection;
  string  AuthenticationMethod[];
  string  EapConfigXmlStream;
  string  EncryptionLevel;
  string  IPSecCustomPolicy[];
  string  L2tpIPsecAuth;
  string  MachineCertificateEKUFilter[];
  string  MachineCertificateIssuerFilter[];
  string  NapState;
  string  TunnelType;
  boolean UseWinlogonCredential;
  string  VpnConfigurationXml;
};

Members

The VpnConnection class has these types of members:

Properties

The VpnConnection class has these properties.

AllUserConnection
Data type: boolean
Access type: Read/write

True if the VPN connection profile is for all users; false if it is for a single user.

AuthenticationMethod
Data type: string array
Access type: Read/write

The authentication protocols to use for the VPN connection.

ValueMeaning
Chap
"Chap"

Challenge Handshake Authentication Protocol (CHAP).

Eap
"Eap"

Extensible Authentication Protocol (EAP).

MachineCertificate
"MachineCertificate"

A machine certificate.

MsChapv2
"MsChapv2"

Microsoft Challenge Handshake Authentication Protocol version 2 (MSCHAPv2).

Pap
"Pap"

Password Authentication Protocol (PAP).

 

EapConfigXmlStream
Data type: string
Access type: Read/write

The XML stream that contains the detailed EAP configuration for the VPN profile.

EncryptionLevel
Data type: string
Access type: Read/write

The encryption level for the VPN connection.

ValueMeaning
Maximum
"Maximum"

Maximum encryption.

NoEncryption
"NoEncryption"

No encryption.

Optional
"Optional"

Optional encryption.

Required
"Required"

Required encryption.

 

IPSecCustomPolicy
Data type: string array
Access type: Read/write
Qualifiers: EmbeddedInstance (VpnConnectionIPsecConfiguration)

The IPSec custom policy.

L2tpIPsecAuth
Data type: string
Access type: Read-only

The authentication method of Layer Two Tunneling Protocol (L2TP) Internet Protocol security (IPSec).

ValueMeaning
Certificate
"Certificate"

Machine certificate.

Psk
"Psk"

Preshared key.

 

MachineCertificateEKUFilter
Data type: string array
Access type: Read/write
Qualifiers: EmbeddedInstance (VpnConnectionIPsecConfiguration)

A filter based on Certificate EKU Name or OID to select the Machine Certificate for authentication. This property applies when IKEv2 tunnel type along with Machine Certificate authentication method is used.

MachineCertificateIssuerFilter
Data type: string array
Access type: Read/write
Qualifiers: EmbeddedInstance (VpnConnectionIPsecConfiguration)

A filter based on the root certificate issuer to select the Machine Certificate for authentication. This property applies when IKEv2 tunnel type along with Machine Certificate authentication method is used.

NapState
Data type: string
Access type: Read-only

The Network Access Protection (NAP) health status of the connection. This property applies when the Protected Extensible Authentication Protocol (PEAP) authentication protocol is used.

ValueMeaning
Error
"Error"

An error occurred.

NoConnection
"NoConnection"

No connection has been made.

NotNapCapable
"NotNapCapable"

NAP is not supported.

Success
"Success"

The connection is successful.

 

TunnelType
Data type: string
Access type: Read/write

The tunnel type that is used in the RAS configuration. The tunnel type is decided after the first successful connection.

ValueMeaning
Automatic
"Automatic"

Automatic detection.

Ikev2
"Ikev2"

Internet Key Exchange version 2 (IKEv2).

L2tp
"L2tp"

Layer 2 Tunneling Protocol.

Pptp
"Pptp"

Point to Point Tunneling Protocol (PPTP).

Sstp
"Sstp"

Secure Socket Tunneling Protocol (SSTP).

 

UseWinlogonCredential
Data type: boolean
Access type: Read/write

True if the Windows logon credentials for the user are automatically used for connection with the current VPN connection profile; otherwise, false.

This flag is only used for the MSCHAPv2 and EAP-MSCHAPv2 authentication methods.

VpnConfigurationXml
Data type: string
Access type: Read-only

An XML representation of this instance, which can be used as input for MSFT_VpnConnection::Set.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Root\Microsoft\Windows\RemoteAccess\Client

MOF

VPNClientPSProvider.mof

DLL

VPNClientPSProvider.dll

See also

VpnCommonConfig
MSFT_VpnConnection
PS_VpnConnection

 

 

Community Additions

Show:
© 2015 Microsoft