> 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/powershell/remote-desktop-manager-powershell/devolutions.powershell-core-module.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Devolutions.PowerShell core module

Install and configure the Devolutions.PowerShell module from the PowerShell Gallery, covering manual setup, script migration, and troubleshooting.

The PowerShell module now needs to be downloaded from the [PowerShell Gallery](https://www.powershellgallery.com/packages/Devolutions.PowerShell/). It is no longer included in the Remote Desktop Manager installation package. This also means that there is no need to install Remote Desktop Manager on a machine to run PowerShell scripts: the module is now sufficient.

{% hint style="info" %}
To connect to an [advanced workspace](https://docs.devolutions.net/rdm/getting-started/workspaces/workspace-types/native-workspaces), the account used to connect to the workspace must have an assigned Remote Desktop Manager license.
{% endhint %}

### Installation

{% hint style="warning" %}
The Devolutions.PowerShell module requires PowerShell 7.6 or later. Windows PowerShell is not supported.
{% endhint %}

#### PowerShell installation

`Install-Module -Name Devolutions.PowerShell`

#### Manual installation

On some machines, it may be required to install the module manually. Here are the steps to complete this process:

1\. Download the [Devolutions.PowerShell module NUPKG file](https://www.powershellgallery.com/packages/Devolutions.PowerShell/) from the PowerShell Gallery. 1. Change the file extension to .zip. 1. Extract the file in **C:\Program Files\WindowsPowerShell\Modules\devolutions.powershell\version**. 1. Unblock all newly extracted files.

```powershell
cd c:\program files\WindowsPowerShell\modules\devolutions.powershell\<version>
dir * | unblock-file -verbose
```

### Migration of your scripts

Once installed, the only required modification is to remove the `Import-Module` command from the scripts used with the old Remote Desktop Manager PowerShell module. As the module is now part of the PowerShell modules installed on the computer, it is no longer necessary to import it into the scripts.

### Use an override configuration (portable)

By using the cmdlets `Get-RDMPowerShellOverride` and `Set-RDMPowerShellOverride`, it is possible to choose another destination folder to save the configuration files or to select a folder different from the one defined by default by the Devolutions.PowerShell module. These commands can also be used to select a folder containing files from an existing Remote Desktop Manager configuration other than the default.

Both properties are optional, and their default values are applied when left empty.

* OptionFilePath: the full path to the **RemoteDesktopManager.cfg** file

Default: **%LOCALAPPDATA%\Devolutions\RemoteDesktopManager**

* RemoteDesktopManagerExecutablePath: for the use of `Open-RDMEntry` (former name `Open-RDMSession`), `Open-RDMQuickConnect`, `Start-RDMProcess` or `Get-RDMCommand`

Default: **%ProgramFiles%\Devolutions\Remote Desktop Manager\RemoteDesktopManager.exe**

When RemoteDesktopManagerExecutablePath is empty, the Devolutions.PowerShell module uses these defaults:

* On Windows: `RemoteDesktopManager.exe` in the Remote Desktop Manager installation folder read from the Windows registry. If no installation is found, the module uses `C:\Program Files(x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager64.exe`.
* On macOS: `/Applications/Remote Desktop Manager.app`.
* On Linux: the `remotedesktopmanager` command.

The object returned by `Get-RDMPowerShellOverride` also has a TelemetryEnabled property (default: `$true`), which [Enable-RDMTelemetry](https://docs.devolutions.net/powershell/powershell-commands/enable-rdmtelemetry.md) and [Disable-RDMTelemetry](https://docs.devolutions.net/powershell/powershell-commands/disable-rdmtelemetry.md) change.

`Set-RDMPowerShellOverride` saves the override values in a file named **PowerShellOverride.cfg** in the default configuration folder of the module (on Windows, **%LOCALAPPDATA%\Devolutions\RemoteDesktopManager**).

```powershell
$override = Get-RDMPowerShellOverride
$override.OptionFilePath = "PathToCfg" # C:\RemoteDesktopManager\2023.1\config\RemoteDesktopManager.cfg
$override.RemoteDesktopManagerExecutablePath = "Path to desired Remote Desktop Manager version" # C:\RemoteDesktopManager\2023.1\Devolutions.RemoteDesktopManager.Bin.2023.1.11.0\RemoteDesktopManager64.exe
Set-RDMPowerShellOverride
# Restart Powershell
```

### How the module finds the Remote Desktop Manager configuration

The Devolutions.PowerShell module reads the Remote Desktop Manager configuration file (**RemoteDesktopManager.cfg**, which holds the list of workspaces) from a configuration folder. The module picks the configuration folder in this order and uses the first one that applies:

1. The folder in the `RDM_POWERSHELL_CONFIG_PATH` environment variable, if it is set. Environment variables in the value are expanded and the folder is created if it does not exist.
2. The folder in the `RDM_CONFIG_PATH` environment variable, if it is set. Environment variables in the value are expanded and the folder is created if it does not exist.
3. The folder of the OptionFilePath value saved with `Set-RDMPowerShellOverride`, if it is set.
4. The folder written on the first line of an **Override.cfg** file placed in the module folder, if that file exists. An empty first line or `.` means the default folder.
5. The default folder of the current user:
   * Windows: **%LOCALAPPDATA%\Devolutions\RemoteDesktopManager** (**%APPDATA%\Devolutions\RemoteDesktopManager** when the module runs in a Remote Desktop Services session on Windows Server).
   * macOS: **\~/Library/Application Support/com.devolutions.remotedesktopmanager**
   * Linux: **\~/.rdm**

The configuration file itself follows a separate rule: when an OptionFilePath is saved with `Set-RDMPowerShellOverride`, the module opens that file directly, whatever `RDM_POWERSHELL_CONFIG_PATH` or `RDM_CONFIG_PATH` contain. The folder order above applies only when no OptionFilePath is saved.

Because the default folder belongs to the current user, a workspace created with `New-RDMWorkspace` exists only for the user who created it. Use `Get-RDMInstance` to display the configuration file in use (OptionFilename).

### Workspace used by the first cmdlet

When the first Remote Desktop Manager cmdlet of a PowerShell session runs, the Devolutions.PowerShell module opens the workspace marked as default (see [Set-RDMDefaultWorkspace](https://docs.devolutions.net/powershell/powershell-commands/set-rdmdefaultworkspace.md)), or the first workspace of the list when none is marked as default. [Set-RDMCurrentWorkspace](https://docs.devolutions.net/powershell/powershell-commands/set-rdmcurrentworkspace.md) and [Set-RDMDefaultWorkspace](https://docs.devolutions.net/powershell/powershell-commands/set-rdmdefaultworkspace.md) do not open that workspace first. Use `Set-RDMCurrentWorkspace` to switch to another workspace in the session.

To connect to an advanced workspace, the account must have an assigned Remote Desktop Manager license. Otherwise, the cmdlets that need a license stop with the error "This account does not have an assigned license, or the license is expired. Ask your administrator to assign you a license." The messages that many cmdlets share are listed in [Common errors and warnings](https://docs.devolutions.net/powershell/powershell-commands/common-errors-and-warnings.md).

### Parameters shared by many cmdlets

#### -ForcePromptAnswer (Remote Desktop Manager cmdlets)

Every Remote Desktop Manager cmdlet built on the common base of the module (252 cmdlets in Devolutions.PowerShell 2026.3.4) accepts `-ForcePromptAnswer`. It answers in advance the yes/no, yes/no/cancel and OK/cancel prompts that the cmdlet would show, which lets a script run without user interaction. The accepted values are `Yes`, `No` and `Cancel`:

* `Yes` accepts the prompt. It also covers the OK and Automatic answers.
* `No` refuses a yes/no/cancel prompt. `Cancel` is used when the prompt has no No option.
* `Cancel` cancels a yes/no/cancel prompt. `No` is used when the prompt has no Cancel option.

When the cmdlet shows several prompts, pass several values; they are used in the order the prompts appear. Use this parameter with caution: it accepts or refuses prompts without showing them.

#### -VaultMode (Remote Desktop Manager entry cmdlets)

The Remote Desktop Manager entry cmdlets (for example `Get-RDMEntry`, `Set-RDMEntry`, `Get-RDMEntryPassword`) accept `-VaultMode` to choose the vault they work in:

* `Default`: the current vault of the workspace (set with `Set-RDMCurrentVault`). This is the default value.
* `User`: the user vault of the current user.
* `Global`: the system vault (global vault) of the workspace. When the workspace does not support a system vault, the cmdlet stops with the error "System vault is not supported in this workspace."

#### -AsLegacyResponse (Devolutions Server cmdlets)

Before Devolutions.PowerShell 2024.2, many Devolutions Server (`DS`) cmdlets returned a ServerResponse object. Since 2024.2, they return the data itself and report failures as PowerShell errors. Add `-AsLegacyResponse` to make a cmdlet return the ServerResponse object again, so that scripts written for earlier versions keep working. Setting a PowerShell variable named `$AsLegacyResponse` to `$true` has the same effect for every cmdlet that supports the switch (92 cmdlets in Devolutions.PowerShell 2026.3.4).

#### -HubContext (Devolutions Cloud cmdlets)

Most Devolutions Cloud (`DC`) cmdlets (63 of 71 in Devolutions.PowerShell 2026.3.4) use the Devolutions Cloud context of the session, created by [Connect-DCAccount](https://docs.devolutions.net/powershell/powershell-commands/connect-dcaccount.md), and accept `-HubContext` to run against another Devolutions Cloud context. When no context exists, they stop with the error "No Hub context found for the current session. Please ensure that you run Connect-HubAccount to login, select a Hub context with Select-HubContext command, set a new Hub context with Set-HubContext or import a Hub context from a file with Import-HubContext." (`Connect-HubAccount`, `Select-HubContext`, `Set-HubContext` and `Import-HubContext` are the former names of `Connect-DCAccount`, `Select-DCContext`, `Set-DCContext` and `Import-DCContext`.)

### Basic troubleshooting

Sometimes, several versions of the PowerShell module may appear to be in use. By typing `$env:PSModulePath`, you can then browse to these locations to delete the files RemoteDesktopManager and RemoteDesktopManager.PowershellModule to reinstall from fresh (renaming does not prevent the system from scanning and finding the modules in them).

```powershell
$env:PSModulePath

C:\Users\admin\Documents\WindowsPowerShell\Modules;
C:\Program Files\WindowsPowerShell\Modules;
C:\windows\system32\WindowsPowerShell\v1.0\Modules
```

### Query PowerShell version and the configuration file in use

```powershell
Get-RDMInstance

ApplicationVersion OptionFilename
------------------ --------------
2023.1.0.14 C:\RemoteDesktopManager\2023.1\config\RemoteDesktopManager.cfg
```


---

# 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/powershell/remote-desktop-manager-powershell/devolutions.powershell-core-module.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.
