> 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/how-to-articles/entry-types-events-settings.md).

# Entry types events settings

Remote Desktop Manager Windows gives you the flexibility to automatically run operations before or after establishing a connection.

These operations are defined in the ***Events*** section of a session's properties. Define a script or a command line which executes at the appropriate time with the provided parameters, such as the session ID or username. For example, events can be used to execute an external batch file or application that prompts the user for more information, or to update a log on a remote server.

### Settings

The ***Events*** section is comprised of four tabs, all of which determine at what point the Events are to be executed relative to the session, e.g., before the connection is established or after its interruption.

| OPTION                           | DESCRIPTION                                                                                                                                                                                         |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| None                             | No script, command line, or message prompt is executed.                                                                                                                                             |
| **Execute script**               | Select a script file to execute.                                                                                                                                                                    |
| **Execute command-line**         | Enter a command line to execute.                                                                                                                                                                    |
| **Prompt message**               | Enter a message to display.                                                                                                                                                                         |
| **Execute macros/scripts/tools** | Select a Macros/Scripts/Tools entry from the workspace.                                                                                                                                             |
| **Execute PowerShell**           | Write a custom PowerShell script. The custom PowerShell script can be [executed before opening the connection](https://docs.devolutions.net/rdm/kb/how-to-articles/execute-powershell-connection/). |
| **Copy to clipboard (custom)**   | Provide text to copy to the clipboard.                                                                                                                                                              |

#### Before open

The ***Miscellaneous*** section of the ***Before open*** tab allows to power on the remote device before trying to establish the connection.

Please note that for the Wake-on-LAN feature to work:

* The remote device must support the Wake-on-LAN feature.
* The MAC address must be filled out in the ***Information*** section of the session properties.

| OPTION            | DESCRIPTION                                                 |
| ----------------- | ----------------------------------------------------------- |
| **Power On mode** | Enable the Wake-on-LAN.                                     |
| **Wait timeout**  | Enter the delay before retrying to wake the remote device.  |
| **Retry count**   | Enter the number of times to try to wake the remote device. |

#### After Open

| OPTION                    | DESCRIPTION                                                                                                                                                                                                 |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Execute automatically** | Execute the macro automatically when the session is open.                                                                                                                                                   |
| **Initial wait**          | Enter the delay before the macro is executed.                                                                                                                                                               |
| **Type**                  | <p>Select how the macro is executed. Choose between:<br>- <strong>Default</strong>: Enter a typing macro manually.<br>- <strong>Link</strong>: Select an existing macro/script/tool from the workspace.</p> |
| **Typing macro**          | Enter the [typing macro](https://docs.devolutions.net/rdm/kb/how-to-articles/entry-types-events-settings/event-auto-typing-macro/) to execute.                                                              |
| **Macro password**        | Enter a password to prompt for before executing the macro. The **Allow password in variable** setting must be enabled in the **Security settings** of the entry.                                            |
| **Delay time**            | Enter the delay time for the {DELAY} instruction.                                                                                                                                                           |
| **Command**               | Enter the delay time between each command.                                                                                                                                                                  |

#### Before close

| OPTION                    | DESCRIPTION                                         |
| ------------------------- | --------------------------------------------------- |
| **Confirm on disconnect** | Add a confirmation step before closing the session. |

#### After close

| OPTION             | DESCRIPTION                                                                             |
| ------------------ | --------------------------------------------------------------------------------------- |
| **Protocol**       | Specifies the protocol used for port knocking (Default, IPv4 and IPv6 ).                |
| **Interval (sec)** | Defines the time interval (in seconds) between consecutive port knocks.                 |
| **Verbose level**  | Determines the amount of logging or feedback provided during the port-knocking process. |

#### See also

* [Devolutions Academy - Streamlining Remote Connections with Event Triggers](https://academy.devolutions.net/student/path/1925316/activity/2668000)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/entry-types-events-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
