> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/windows-built-in-vpn.md).

# Microsoft VPN

Configure the Microsoft VPN entry in Remote Desktop Manager, including the VPN type, server, pre-shared key, authentication method, and phone book.

This article details the many settings and options available for ***Microsoft VPN*** entries in Remote Desktop Manager. This entry opens a VPN connection with the VPN client built into Windows, using a VPN profile from a Windows phone book.

{% hint style="info" %}
The ***Username***, ***Domain***, and ***Password*** fields of the ***Connection*** tab are disabled when ***Use rasphone (Connection Manager Administration Kit)*** is enabled, and when the entry uses credentials that are not configured in the entry itself. See [Create a Microsoft L2TP VPN entry](https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/create-a-microsoft-l2tp-vpn-entry.md) for a step by step approach to an L2TP configuration.
{% endhint %}

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>SETTINGS</strong></td><td><strong>DESCRIPTION</strong></td></tr><tr><td><strong>Name</strong></td><td>The name of the entry.</td></tr><tr><td><strong>Folder</strong></td><td>The folder where the entry is located.</td></tr><tr><td><strong>Display</strong></td><td>How the entry is displayed. <em><strong>External</strong></em> is the only display mode available for this entry. Additional lists let you choose the monitor and the virtual desktop where the window opens.</td></tr><tr><td><strong>Host</strong></td><td>Where the host of the VPN comes from. Select whether the host is configured in the entry, linked to a host entry, or inherited from a parent folder.</td></tr><tr><td><strong>Credentials</strong></td><td>Where the credentials used by the VPN come from. Select whether the credentials are configured in the entry, linked to a credential entry, or obtained another way.</td></tr><tr><td><strong>VPN type</strong></td><td>The type of VPN the entry opens. Set to <em><strong>Microsoft VPN</strong></em> for this entry. Changing it switches the entry to another VPN type and changes the content of the <em><strong>Connection</strong></em> tab.</td></tr></tbody></table>

### Connection

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>VPN type</strong></td><td><p>The protocol of the Windows VPN connection. Set to <em><strong>Automatic</strong></em> by default:</p><ul><li><strong>Automatic</strong></li><li><strong>L2TP</strong></li><li><strong>SSTP</strong></li><li><strong>PPTP</strong></li></ul></td></tr><tr><td><strong>VPN name</strong></td><td>The name of the VPN profile to open. Select a profile found in the selected phone book, or type a name. Click the <em><strong>Refresh</strong></em> button to reload the list of profiles. Click the <em><strong>Security settings</strong></em> button to open the phone book file. This button is available only when the phone book is set to <em><strong>Default phone book</strong></em> or <em><strong>Phone book</strong></em>.</td></tr><tr><td><strong>Pre-shared key</strong></td><td>The pre-shared key of the VPN. Shown only when <em><strong>VPN type</strong></em> is set to <em><strong>L2TP</strong></em>.</td></tr><tr><td><strong>Server</strong></td><td>The address of the VPN server. Shown only when <em><strong>VPN type</strong></em> is set to <em><strong>L2TP</strong></em>, <em><strong>SSTP</strong></em>, or <em><strong>PPTP</strong></em>. The server is used only if the VPN profile is not found. If no server is specified, the VPN name is used as the host.</td></tr><tr><td><strong>Username</strong></td><td>The username used to connect to the VPN.</td></tr><tr><td><strong>Domain</strong></td><td>The domain of the VPN account.</td></tr><tr><td><strong>Password</strong></td><td>The password used to connect to the VPN. This field is disabled when the <em><strong>Disable password saving in vaults</strong></em> system setting is enabled.</td></tr><tr><td><strong>Authentication method</strong></td><td><p>The authentication method of the VPN. Shown only when <em><strong>VPN type</strong></em> is set to <em><strong>L2TP</strong></em>, <em><strong>SSTP</strong></em>, or <em><strong>PPTP</strong></em>. Set to <em><strong>Pap</strong></em> by default:</p><ul><li><strong>Pap</strong></li><li><strong>Chap</strong></li><li><strong>MSCHAPv2</strong></li><li><strong>EAP</strong></li></ul></td></tr><tr><td colspan="2"><strong>Options</strong></td></tr><tr><td><strong>Show console error</strong></td><td>Show the console error when the VPN connection fails.</td></tr><tr><td><strong>Ignore error code</strong></td><td>Ignore the error code returned when the VPN is opened or closed.</td></tr><tr><td><strong>Use certificate only</strong></td><td>Authenticate to the VPN with a certificate only.</td></tr><tr><td><strong>Use rasphone (Connection Manager Administration Kit)</strong></td><td>Open the VPN with rasphone. When enabled, the <em><strong>Username</strong></em>, <em><strong>Domain</strong></em>, and <em><strong>Password</strong></em> fields are disabled.</td></tr><tr><td><strong>Use the default gateway on the remote network</strong></td><td>Use the default gateway on the remote network for the VPN connection.</td></tr><tr><td colspan="2"><strong>Phone book</strong></td></tr><tr><td><strong>Phone book</strong></td><td><p>The Windows phone book that contains the VPN profile. Set to <em><strong>Default phone book</strong></em> by default:</p><ul><li><strong>Default phone book</strong> — Use the default Windows phone book.</li><li><strong>Phone book</strong> — Use a specific phone book file. Enter the path of the <code>.pbk</code> file, or click the ellipsis button to select or create it.</li><li><strong>Embedded phone book</strong> — Store the phone book in the entry. Click the <em><strong>Import</strong></em> button to import a <code>.pbk</code> file, and the <em><strong>Export</strong></em> button to save the embedded phone book to a file. The <em><strong>Export</strong></em> button is available once the entry holds an embedded phone book.</li><li><strong>Phone book document</strong> — Use a phone book stored in a document entry of the vault. Select the document entry from the list.</li></ul></td></tr><tr><td><strong>RAS phone number</strong></td><td>The RAS phone number of the VPN connection.</td></tr></tbody></table>

### Advanced

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Go offline on connection</strong></td><td>Switch Remote Desktop Manager to offline mode once the VPN is connected.</td></tr><tr><td><strong>Close connection after (min)</strong></td><td>Close the VPN automatically after the set number of minutes, between 0 and 4320.</td></tr><tr><td><strong>Detect reachable host in wait</strong></td><td>While waiting for the VPN to connect, check whether the host can be reached, so the wait can end as soon as it can.</td></tr><tr><td><strong>VPN reconnect mode</strong></td><td><p>Choose what happens to the VPN when a session that uses it is reconnected:</p><ul><li><strong>Default</strong></li><li><strong>Reconnect VPN</strong></li><li><strong>Leave VPN open</strong></li></ul></td></tr><tr><td><strong>Go online on disconnect after (sec)</strong></td><td>Switch Remote Desktop Manager back to online mode the set number of seconds after the VPN is disconnected, between 0 and 180.</td></tr><tr><td><strong>Use adapter to detect connection</strong></td><td>Use the network adapter to detect whether the VPN connection is open.</td></tr><tr><td><strong>After execution, wait</strong></td><td><p>Choose how Remote Desktop Manager waits after the VPN is started:</p><ul><li><strong>Delay</strong> — Wait the set number of seconds, between -1 and 180.</li><li><strong>For IP on adapter</strong> — Wait for the network adapter to receive an IP address. Enter the adapter name or device name, or click the browse button to select it. Set <em><strong>Wait a maximum of</strong></em> (in seconds, between -1 and 180) and <em><strong>Then delay</strong></em> (in milliseconds, between -1 and 180000).</li></ul></td></tr><tr><td colspan="2"><strong>Commands</strong></td></tr><tr><td><strong>Commands</strong></td><td>The list of VPN commands, showing each command's <em><strong>Name</strong></em>, <em><strong>After connection command</strong></em>, and <em><strong>Before disconnecting command</strong></em>. Use the toolbar to add, edit, delete, move up, or move down a command. The settings of the <em><strong>Commands</strong></em> section are available only when <em><strong>After execution, wait</strong></em> is set to <em><strong>For IP on adapter</strong></em>, and are not supported on macOS.</td></tr><tr><td><strong>After connecting, VPN command enabled</strong></td><td>Run the after connection commands once the VPN is connected.</td></tr><tr><td><strong>Before disconnecting, VPN command enabled</strong></td><td>Run the before disconnecting commands before the VPN is disconnected.</td></tr><tr><td><strong>Run routes in batch (forces elevated privileges)</strong></td><td>Run the commands together in a batch. This option requires elevated privileges.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/windows-built-in-vpn.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
