Set method of the PS_VpnConnection class
Modifies an existing virtual private network (VPN) connection profile.
Syntax
static uint32 Set(
[in] string ServerAddress,
[in] boolean AllUserConnection,
[in] boolean SplitTunneling,
[in] boolean RememberCredential,
[in] string TunnelType,
[in] boolean PassThru,
[in] boolean Force,
[in] string L2tpPsk,
[in] string AuthenticationMethod[],
[in] string EapConfigXmlStream,
[in] string Name,
[in] boolean UseWinlogonCredential,
[in] string EncryptionLevel,
[in] string MachineCertificateEKUFilter[],
[in] uint8 MachineCertificateIssuerFilter[],
[in] VpnServerAddress ServerList[],
[in] uint32 IdleDisconnectSeconds,
[in] string DnsSuffix,
[out] VpnConnection cmdletOutput
);
Parameters
-
ServerAddress [in]
-
The address of the remote VPN server that the client connects to. This address is a URL, a friendly name, an IPv4 address, or an IPv6 address. This should be one of the elements of ServerList.
-
AllUserConnection [in]
-
True if the VPN connection profile is for all users; false if it is for a single user.
-
SplitTunneling [in]
-
True to enable split tunneling for the VPN connection profile; otherwise, false.
-
RememberCredential [in]
-
True to store the credentials that are supplied upon the first successful connection; otherwise, false.
-
TunnelType [in]
-
The tunnel type that is used in the RAS configuration. The tunnel type is decided after the first successful connection.
-
Pptp ("Pptp")
-
Point to Point Tunneling Protocol (PPTP).
-
L2tp ("L2tp")
-
Layer 2 Tunneling Protocol (L2TP).
-
Sstp ("Sstp")
-
Secure Socket Tunneling Protocol (SSTP).
-
Ikev2 ("Ikev2")
-
Internet Key Exchange version 2 (IKEv2).
-
Automatic ("Automatic")
-
The tunnel types are tried in sequence.
Windows 8 and Windows Server 2012: The value is not available before Windows 8.1 and Windows Server 2012 R2.
PassThru [in]
True to return the VpnConnection object that contains the VPN configuration settings; otherwise, false.
Force [in]
True to force the supplying of the preshared key value over an unsecure channel, if L2TP is used; otherwise, false.
L2tpPsk [in]
The value of the preshared key to be used for L2TP authentication. If this parameter is not specified, a certificate is used for L2TP.
AuthenticationMethod [in]
The authentication protocols to use for the VPN connection.
Pap ("Pap")
Password Authentication Protocol (PAP).
Chap ("Chap")
Challenge Handshake Authentication Protocol (CHAP).
MsChapv2 ("MsChapv2")
Microsoft Challenge Handshake Authentication Protocol version 2 (MSCHAPv2).
Eap ("Eap")
Extensible Authentication Protocol (EAP).
MachineCertificate ("MachineCertificate")
A machine certificate.
Windows 8 and Windows Server 2012: The value is not available before Windows 8.1 and Windows Server 2012 R2.
EapConfigXmlStream [in]
The contents of the EAP XML configuration file, which includes the EAP method identifier.
Name [in]
The name of the VPN connection profile to be modified.
UseWinlogonCredential [in]
True if the Windows logon credentials for the user are automatically used for a connection with the current VPN connection profile; otherwise, false.
This flag is only used for authentication protocols that involve MSCHAPv2.
EncryptionLevel [in]
Specifies the encryption level for the VPN connection.
NoEncryption ("NoEncryption")
No encryption.
Optional ("Optional")
Required ("Required")
Maximum ("Maximum")
Custom ("Custom")
Windows 8 and Windows Server 2012: The value is not available before Windows 8.1 and Windows Server 2012 R2.
MachineCertificateEKUFilter [in]
A filter based on the 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 [in]
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.
ServerList [in]
The VPN servers that the client can connect to.
IdleDisconnectSeconds [in]
The amount of idle time after which a connection is terminated. A value of 0 disables the time-out.
DnsSuffix [in]
DNS suffix of the VPN connection
cmdletOutput [out]
When this method returns, contains the VpnConnection object.
Requirements
Minimum supported client |
Windows 8 |
Minimum supported server |
Windows Server 2012 |
Namespace |
Root\Microsoft\Windows\RemoteAccess\Client |
MOF |
|
DLL |
|