> 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/command-line-script.md).

# Command-line

Configure Command-line session tool entries in Remote Desktop Manager, including the command, arguments, parameters, execution mode, and run options.

This article details the many settings and options available for ***Command-line*** session tool entries in Remote Desktop Manager.

{% hint style="info" %}
On macOS and Linux, the browse button of the ***Run*** field and the ***Window selector*** button are not available.
{% 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></tbody></table>

### General

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Run</strong></td><td>The command to run. Enter it, or click the browse button to select a program. The field cannot be empty when you save the entry.</td></tr><tr><td><strong>Window selector</strong></td><td>Select a window that is already open to fill in the <em><strong>Run</strong></em> field with the path of its program, in quotation marks.</td></tr><tr><td><strong>Arguments</strong></td><td>The arguments passed to the command.</td></tr><tr><td><strong>Assign file icon to session</strong></td><td>Link that uses the icon of the file in the <em><strong>Run</strong></em> field as the icon of the entry.</td></tr><tr><td><strong>Change default working directory</strong></td><td>Run the command in another working directory. Select the folder in the field below the checkbox.</td></tr></tbody></table>

### Parameters

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Add</strong></td><td>Add a parameter at the end of the list, after the five parameters that are always present.</td></tr><tr><td><strong>Delete</strong></td><td>Remove the last parameter added with <em><strong>Add</strong></em>. Available when a parameter was added.</td></tr><tr><td><strong>Parameter name</strong></td><td>The name of the parameter. Click the name to rename the parameter in a separate window. Each row shows the token to use in the <em><strong>Run</strong></em> field, such as <code>{1}</code> for the first parameter. The delete button of a row, shown when its type is not <em><strong>Unused</strong></em>, clears the value, sets the type to <em><strong>Unused</strong></em>, and restores the default name. On Linux, the name is typed directly in the row, and an <em><strong>Add parameter</strong></em> button below the list replaces the <em><strong>Add</strong></em> and <em><strong>Delete</strong></em> buttons.</td></tr><tr><td><strong>Type</strong></td><td><p>The type of the parameter:</p><ul><li><strong>Unused</strong></li><li><strong>Text</strong></li><li><strong>Secured</strong></li><li><strong>Env. variable</strong></li></ul></td></tr><tr><td><strong>Default value</strong></td><td>The value of the parameter. A <em><strong>Secured</strong></em> parameter hides its value.</td></tr><tr><td><strong>Prompt for parameters on open</strong></td><td>Ask for the parameter values each time the entry opens.</td></tr><tr><td><strong>Example in Run field</strong></td><td>Shows how to use the parameter tokens in the <em><strong>Run</strong></em> field. Click <em><strong>View command</strong></em> to display the command with the parameter values inserted.</td></tr></tbody></table>

### Advanced

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Execution mode</strong></td><td><p>How the command runs:</p><ul><li><strong>Default</strong></li><li><strong>Keep command-line open</strong></li><li><strong>Capture output</strong></li></ul><p>With <em><strong>Capture output</strong></em>, a second list sets where the output goes: <em><strong>Default</strong></em> or <em><strong>To file</strong></em>. With <em><strong>To file</strong></em>, enter the path of the output file. The path is required.</p></td></tr><tr><td><strong>Wait for the application to exit (Remote Desktop Manager will be unavailable)</strong></td><td>Wait until the command ends before Remote Desktop Manager can be used again. When <em><strong>Execution mode</strong></em> is <em><strong>Capture output</strong></em>, this option is selected and cannot be cleared.</td></tr><tr><td><strong>Run as a different user</strong></td><td>Run the command as another user. Clears <em><strong>Run as administrator</strong></em>.</td></tr><tr><td><strong>Run as administrator</strong></td><td>Run the command with administrator privileges. Clears <em><strong>Run as a different user</strong></em>.</td></tr><tr><td><strong>Shell execute</strong></td><td>Start the command through the operating system shell. Available when <em><strong>Run as a different user</strong></em> is cleared.</td></tr><tr><td><strong>Net only</strong></td><td>Use the other user's credentials for network access only. Available when <em><strong>Run as a different user</strong></em> is selected.</td></tr><tr><td><strong>Open embedded/tabbed</strong></td><td>Open the command window in a tab of Remote Desktop Manager instead of an external window.</td></tr><tr><td><strong>Embedded wait time</strong></td><td>The time to wait before embedding the command window, from 0 to 50000 milliseconds. Available when <em><strong>Open embedded/tabbed</strong></em> is selected.</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/command-line-script.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.
