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

# PowerShell script

Configure PowerShell script entries in Remote Desktop Manager, including the script source, PowerShell version, run mode, terminal, and parameters.

This article details the settings and options available for ***PowerShell script*** entries, a type of ***Tools and automation*** entry in Remote Desktop Manager.

{% hint style="info" %}
On macOS, the editor marks several settings as unsupported: ***PowerShell version***, ***Mode***, ***Output view***, ***Command type***, ***Terminal application***, ***Configuration***, ***Use SSL***, ***Load RDM CmdLet***, ***Run as administrator***, ***Run as a different user***, ***Resize window***, ***Hide window***, and ***Debug***.
{% 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>Type</strong></td><td><p>Select where the script comes from:</p><ul><li><strong>Command</strong> — run the command entered in the <em><strong>Command</strong></em> field.</li><li><strong>Embedded script</strong> — run the script stored in the entry.</li><li><strong>Filename</strong> — run the script file entered in the <em><strong>Filename</strong></em> field.</li></ul></td></tr><tr><td><strong>Command</strong></td><td>Enter the PowerShell command to run. Available when <em><strong>Type</strong></em> is set to <em><strong>Command</strong></em>.</td></tr><tr><td><strong>Filename</strong></td><td>Enter the path of the PowerShell script file, or click the browse button to select it. Available when <em><strong>Type</strong></em> is set to <em><strong>Filename</strong></em>.</td></tr><tr><td><strong>Script</strong></td><td>Enter the script in the editor. Click the <em><strong>Edit embedded script</strong></em> button to edit the script in a separate editor window. Available when <em><strong>Type</strong></em> is set to <em><strong>Embedded script</strong></em>.</td></tr></tbody></table>

### Run

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Arguments</strong></td><td>Enter the arguments passed to the script.</td></tr><tr><td><strong>Executable arguments</strong></td><td>Enter the arguments passed to the PowerShell executable.</td></tr><tr><td><strong>Working directory</strong></td><td>Select the folder used as the working directory.</td></tr><tr><td><strong>PowerShell version</strong></td><td><p>Select the PowerShell version used to run the script:</p><ul><li><strong>Default</strong> — the list shows the version used by default in parentheses.</li><li><strong>Windows PowerShell (2.0)</strong> — marked as deprecated in the list.</li><li><strong>Windows PowerShell (5.1)</strong></li><li><strong>PowerShell 7</strong></li></ul></td></tr><tr><td><strong>Mode</strong></td><td><p>Select where the script runs:</p><ul><li><strong>Default</strong> — shown as <em><strong>Default (Automatic)</strong></em> in the list.</li><li><strong>Local</strong> — run the script on the local computer.</li><li><strong>Remote</strong> — run the script on a remote host. When the entry is not launched from a session, Remote Desktop Manager prompts for the host.</li></ul></td></tr><tr><td><strong>Output view</strong></td><td><p>Select how the script output is displayed:</p><ul><li><strong>Default</strong> — shown as <em><strong>Default (Terminal)</strong></em> in the list.</li><li><strong>Terminal</strong></li><li><strong>Text</strong></li><li><strong>Grid</strong></li></ul></td></tr><tr><td><strong>Command type</strong></td><td><p>Select how the script is passed to PowerShell:</p><ul><li><strong>Default</strong> — the list shows the command type used by default in parentheses.</li><li><strong>Command</strong></li><li><strong>Encoded command</strong></li><li><strong>Secure command</strong></li></ul></td></tr></tbody></table>

### Terminal

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Terminal application</strong></td><td><p>Select the terminal application that hosts PowerShell:</p><ul><li><strong>Default</strong> — shown as <em><strong>Default (Windows Terminal)</strong></em> in the list.</li><li><strong>Classic</strong></li><li><strong>Windows Terminal</strong></li><li><strong>Let Windows decide</strong></li></ul></td></tr><tr><td><strong>Configuration</strong></td><td>Select a Windows Terminal entry whose profile is used to open the terminal. This setting is optional. Leave it empty to use the default profile configured on the computer. Click the browse button to pick an entry, or click the clear button to remove the selection. Available when <em><strong>Terminal application</strong></em> is set to <em><strong>Default</strong></em> or <em><strong>Windows Terminal</strong></em>. The selected entry is saved only when <em><strong>Terminal application</strong></em> is set to <em><strong>Windows Terminal</strong></em>.</td></tr></tbody></table>

### Parameters

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Parameter name</strong></td><td>The name of the parameter. Click the name to rename the parameter in a separate window.</td></tr><tr><td><strong>#</strong></td><td>The token that identifies the parameter on the command line, such as <code>{1}</code> for the first parameter.</td></tr><tr><td><strong>Type</strong></td><td><p>Select the parameter type:</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 default value of the parameter. The value is masked when the type is <em><strong>Secured</strong></em>, and unavailable when the type is <em><strong>Unused</strong></em>.</td></tr><tr><td><strong>Delete</strong> (row button)</td><td>Reset the parameter of the row: its type returns to <em><strong>Unused</strong></em>, its default value is cleared, and its name returns to the default name. Shown when the type is not <em><strong>Unused</strong></em>.</td></tr><tr><td><strong>Add</strong></td><td>Add a parameter at the end of the list.</td></tr><tr><td><strong>Delete</strong></td><td>Remove the last parameter of the list. Available when parameters were added beyond the first five.</td></tr><tr><td><strong>Load</strong></td><td>Load the parameters declared in the script into the list. Available when the script is not empty.</td></tr><tr><td><strong>Prompt for parameters on open</strong></td><td>Prompt for the parameter values when the entry is opened.</td></tr></tbody></table>

On macOS and Linux, the parameter names are typed directly in the list, the token is shown to the left of the name, and the ***Add parameter*** button below the list replaces the ***Add*** and ***Delete*** buttons. Hover over a row and click its delete button to clear the parameter.

### Advanced

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Use SSL</strong></td><td>Use SSL for the remote PowerShell connection.</td></tr><tr><td><strong>Load RDM CmdLet</strong></td><td>Load the Remote Desktop Manager PowerShell cmdlets in the session that runs the script.</td></tr><tr><td><strong>Run as administrator</strong></td><td>Run the script with administrator privileges. Enabling this option clears <em><strong>Run as a different user</strong></em>.</td></tr><tr><td><strong>Run as a different user</strong></td><td>Run the script under another user account. Enabling this option clears <em><strong>Run as administrator</strong></em>.</td></tr><tr><td><strong>Use session credentials</strong></td><td>Use the credentials of the session the entry is launched on. Remote Desktop Manager uses the credentials from the session tools section first, then the session credentials if nothing is found.</td></tr><tr><td><strong>No exit</strong></td><td>Keep PowerShell open after the script finishes.</td></tr><tr><td><strong>Resize window</strong></td><td>Resize the PowerShell window and buffer to the sizes set in the application settings when the script starts.</td></tr><tr><td><strong>No profile</strong></td><td>Start PowerShell without loading the PowerShell profile.</td></tr><tr><td><strong>Hide window</strong></td><td>Hide the PowerShell window while the script runs.</td></tr><tr><td><strong>No logo</strong></td><td>Start PowerShell without displaying the copyright banner.</td></tr><tr><td><strong>Debug</strong></td><td>Display the preparation steps that Remote Desktop Manager runs before the script, instead of clearing the console.</td></tr><tr><td><strong>Open embedded/tabbed</strong></td><td>Open the entry in a tab inside Remote Desktop Manager instead of in an external window.</td></tr><tr><td><strong>Wait for the application to exit (Remote Desktop Manager will be unavailable)</strong></td><td>Wait until PowerShell exits before Remote Desktop Manager becomes available again.</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/powershell-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.
