VpnManagementAgent VpnManagementAgent VpnManagementAgent VpnManagementAgent Class

Definition

Allows the creation, deletion, edit, connect, and disconnect flows for VPN. These can be used to manage the lifecycle of a VPN profile, and to create a custom VPN connection manager.

public : sealed class VpnManagementAgent : IVpnManagementAgentpublic sealed class VpnManagementAgent : IVpnManagementAgentPublic NotInheritable Class VpnManagementAgent Implements IVpnManagementAgent// This API is not available in Javascript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

Constructors

VpnManagementAgent() VpnManagementAgent() VpnManagementAgent() VpnManagementAgent()

Constructor to allows VPN app to create this object.

public : VpnManagementAgent()public VpnManagementAgent()Public Sub New()// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

Methods

AddProfileFromObjectAsync(IVpnProfile) AddProfileFromObjectAsync(IVpnProfile) AddProfileFromObjectAsync(IVpnProfile) AddProfileFromObjectAsync(IVpnProfile)

Creates a new VPN Profile based on the VpnProfile input object.

public : IAsyncOperation<VpnManagementErrorStatus> AddProfileFromObjectAsync(IVpnProfile profile)public IAsyncOperation<VpnManagementErrorStatus> AddProfileFromObjectAsync(IVpnProfile profile)Public Function AddProfileFromObjectAsync(profile As IVpnProfile) As IAsyncOperation( Of VpnManagementErrorStatus )// This API is not available in Javascript.
Parameters
profile
IVpnProfile IVpnProfile IVpnProfile IVpnProfile

A VpnProfile object.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

AddProfileFromXmlAsync(String) AddProfileFromXmlAsync(String) AddProfileFromXmlAsync(String) AddProfileFromXmlAsync(String)

Creates a new VPN connection based on a WAP xml string for the VPNv2 CSP.

public : IAsyncOperation<VpnManagementErrorStatus> AddProfileFromXmlAsync(PlatForm::String xml)public IAsyncOperation<VpnManagementErrorStatus> AddProfileFromXmlAsync(String xml)Public Function AddProfileFromXmlAsync(xml As String) As IAsyncOperation( Of VpnManagementErrorStatus )// This API is not available in Javascript.
Parameters
xml
PlatForm::String String String String

A VpnProfile object.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

ConnectProfileAsync(IVpnProfile) ConnectProfileAsync(IVpnProfile) ConnectProfileAsync(IVpnProfile) ConnectProfileAsync(IVpnProfile)

Connects to an existing VPN profile.

public : IAsyncOperation<VpnManagementErrorStatus> ConnectProfileAsync(IVpnProfile profile)public IAsyncOperation<VpnManagementErrorStatus> ConnectProfileAsync(IVpnProfile profile)Public Function ConnectProfileAsync(profile As IVpnProfile) As IAsyncOperation( Of VpnManagementErrorStatus )// This API is not available in Javascript.
Parameters
profile
IVpnProfile IVpnProfile IVpnProfile IVpnProfile

A VpnProfile object.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

ConnectProfileWithPasswordCredentialAsync(IVpnProfile, PasswordCredential) ConnectProfileWithPasswordCredentialAsync(IVpnProfile, PasswordCredential) ConnectProfileWithPasswordCredentialAsync(IVpnProfile, PasswordCredential) ConnectProfileWithPasswordCredentialAsync(IVpnProfile, PasswordCredential)

Connects to a VPN profile using a specified set of password credentials.

public : IAsyncOperation<VpnManagementErrorStatus> ConnectProfileWithPasswordCredentialAsync(IVpnProfile profile, PasswordCredential passwordCredential)public IAsyncOperation<VpnManagementErrorStatus> ConnectProfileWithPasswordCredentialAsync(IVpnProfile profile, PasswordCredential passwordCredential)Public Function ConnectProfileWithPasswordCredentialAsync(profile As IVpnProfile, passwordCredential As PasswordCredential) As IAsyncOperation( Of VpnManagementErrorStatus )// This API is not available in Javascript.
Parameters
profile
IVpnProfile IVpnProfile IVpnProfile IVpnProfile

A VpnProfile object.

passwordCredential
PasswordCredential PasswordCredential PasswordCredential PasswordCredential

The current password used by the user to log on to the VPN server.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

DeleteProfileAsync(IVpnProfile) DeleteProfileAsync(IVpnProfile) DeleteProfileAsync(IVpnProfile) DeleteProfileAsync(IVpnProfile)

Deletes an existing VPN profile.

public : IAsyncOperation<VpnManagementErrorStatus> DeleteProfileAsync(IVpnProfile profile)public IAsyncOperation<VpnManagementErrorStatus> DeleteProfileAsync(IVpnProfile profile)Public Function DeleteProfileAsync(profile As IVpnProfile) As IAsyncOperation( Of VpnManagementErrorStatus )// This API is not available in Javascript.
Parameters
profile
IVpnProfile IVpnProfile IVpnProfile IVpnProfile

A VpnProfile object.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

DisconnectProfileAsync(IVpnProfile) DisconnectProfileAsync(IVpnProfile) DisconnectProfileAsync(IVpnProfile) DisconnectProfileAsync(IVpnProfile)

Disconnects from a connected VPN profile.

public : IAsyncOperation<VpnManagementErrorStatus> DisconnectProfileAsync(IVpnProfile profile)public IAsyncOperation<VpnManagementErrorStatus> DisconnectProfileAsync(IVpnProfile profile)Public Function DisconnectProfileAsync(profile As IVpnProfile) As IAsyncOperation( Of VpnManagementErrorStatus )// This API is not available in Javascript.
Parameters
profile
IVpnProfile IVpnProfile IVpnProfile IVpnProfile

A VpnProfile object.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

GetProfilesAsync() GetProfilesAsync() GetProfilesAsync() GetProfilesAsync()

Gets the accessible list of present VPN profiles.

public : IAsyncOperation<IVectorView<IVpnProfile>> GetProfilesAsync()public IAsyncOperation<IReadOnlyList<IVpnProfile>> GetProfilesAsync()Public Function GetProfilesAsync() As IAsyncOperation( Of IReadOnlyListIVpnProfile )// This API is not available in Javascript.
Returns
IAsyncOperation<IVectorView<IVpnProfile>> IAsyncOperation<IReadOnlyList<IVpnProfile>> IAsyncOperation<IReadOnlyList<IVpnProfile>> IAsyncOperation<IReadOnlyList<IVpnProfile>>

A list of present VPN profiles.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

UpdateProfileFromObjectAsync(IVpnProfile) UpdateProfileFromObjectAsync(IVpnProfile) UpdateProfileFromObjectAsync(IVpnProfile) UpdateProfileFromObjectAsync(IVpnProfile)

Updates a VPN profile based on an input object.

public : IAsyncOperation<VpnManagementErrorStatus> UpdateProfileFromObjectAsync(IVpnProfile profile)public IAsyncOperation<VpnManagementErrorStatus> UpdateProfileFromObjectAsync(IVpnProfile profile)Public Function UpdateProfileFromObjectAsync(profile As IVpnProfile) As IAsyncOperation( Of VpnManagementErrorStatus )// This API is not available in Javascript.
Parameters
profile
IVpnProfile IVpnProfile IVpnProfile IVpnProfile

A VpnProfile object.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

UpdateProfileFromXmlAsync(String) UpdateProfileFromXmlAsync(String) UpdateProfileFromXmlAsync(String) UpdateProfileFromXmlAsync(String)

Updates an existing VPN profile based on an input WAP XML string.

public : IAsyncOperation<VpnManagementErrorStatus> UpdateProfileFromXmlAsync(PlatForm::String xml)public IAsyncOperation<VpnManagementErrorStatus> UpdateProfileFromXmlAsync(String xml)Public Function UpdateProfileFromXmlAsync(xml As String) As IAsyncOperation( Of VpnManagementErrorStatus )// This API is not available in Javascript.
Parameters
xml
PlatForm::String String String String

A Wireless Application Protocol (WAP) XML string.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider