Support

Support forum for Devolutions PowerShell

avatar

Maurice Côté

Introduction of our GitHub repository for samples and scripts

Hi All, This forum has served its usefulness for a long time but it is now becoming harder to find up-to-date information. Older topics contain instructions that have been deprecated over time and this may send you down the wrong path on achieving your goals. Questions and requests for samples should still be posted right here, but the Devolutions Team will most likely respond with a link to the proper script in the GitHub repo. The repository can be found at https://github.com/Devolutions/RDMSamples-ps , please watch it or, even better, star it so we have an idea of how many of you are using it. Happy scripting!

2123

7

avatar

Erica Poirier

avatar

tonyfredriksson

Get-RDMOauthToken not working since version 2026.1.0

Hi. Get-RDMOauthToken stopped working since version 2026.1.0 at least, but i tried with the latest 2026.1.2 as well. PS C:\Users\to-fre> Get-Command -Module Devolutions.Powershell | where {$_.Name -match "Get-RDMOAuthToken"} CommandType Name Version Source ----------- ---- ------- ------ Cmdlet Get-RDMOAuthToken 2026.1.2 Devolutions.PowerShell PS C:\Users\to-fre> New-DSSession -BaseURI $DSServerUri -UseOAuth PS C:\Users\to-fre> Get-RDMOAuthToken Get-RDMOAuthToken: The type initializer for 'System.Text.Json.JsonSerializer' threw an exception. PS C:\Users\to-fre> Import-Module -Name Devolutions.PowerShell -requiredVersion 2025.3.4 PS C:\Users\to-fre> Get-Command -Module Devolutions.Powershell | where {$_.Name -match "Get-RDMOAuthToken"} CommandType Name Version Source ----------- ---- ------- ------ Cmdlet Get-RDMOAuthToken 2025.3.4 Devolutions.PowerShell PS C:\Users\to-fre> New-DSSession -BaseURI $DSServerUri -UseOAuth PS C:\Users\to-fre> Get-RDMOAuthToken AccessToken ----------- e........... Br, Tony

30

2

avatar

Christian Robert

avatar

tblanken

Question Create and Update Entry via Powershell

Hello, we try creating new entries and update via PowerShell. Out current script looks like this: $URL = "https://ourServer"; $pEntryName = "00001" $diag = [ordered]@{} try { # Connect $diag.Session = New-DSSession -BaseURI $URL -WindowsAuthentication # Try get Entry by Name $newEntry = Get-DSEntry -VaultID "00000000-0000-0000-0000-000000000000" -FilterMatch ExactExpression -FilterValue "$pEntryName" if ($null -eq $newEntry){ # Entry not available - Create a new empty Entry inside desired vault $newEntry = New-DSCredentialEntry -Name "$pEntryName" -VaultID "00000000-0000-0000-0000-000000000000" $newEntry.connectionType = 26 # 5 - Website-Type #26 - CredentialEntry # --- User and Password $newEntry.data | Add-Member -MemberType NoteProperty -Name "userName" -Value "MyNewUser" $newEntry.data.passwordItem = @{hasSensitiveData = $false; sensitiveData = "MyNewPassword" } #Convert to Json $newEntryJson = $newEntry | ConvertTo-Json -Depth 100 # Update Entry on Server Update-DSEntryBase -JsonBody $newEntryJson } else{ # Entry available - update password $cred = $newEntry.data $cred.passwordItem | Add-Member -MemberType NoteProperty -Name SensitiveData -Value "MyNewerPassword" Update-DSEntryBase -JsonBody (ConvertTo-Json -InputObject $cred -Depth 4) } } catch { $diag.Error = $_.Exception.Message } $diag.Error When executing: Creation of entry succeeds Update of entry fails Error: … swordItem | Add-Member -MemberType NoteProperty -Name SensitiveData - … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot bind argument to parameter 'InputObject' because it is null. I read from here: https://docs.devolutions.net/powershell/powershell-commands/update-dsentrybase/ Version: Current Version of DVLS, PowerShell-Modules, ... Does anyone can give me a hint? Best regards, Torben

274

16

avatar

Christian Robert

avatar

csudderth

Backlog

Powershell seems to hang when exiting after using a Devolutions.Powershell cmdlet

Powershell hangs whenever I try to exit whenever I have used a Devolutions.Powershell cmdlet during the session. Even when I run New-DSSession with invalid credentials and never actually make a connection, it makes Powershell freeze on exit. I first noticed this in a Gitlab CI/CD pipeline on a Linux Docker runner. The Powershell script would run successfully but would hang indefinitely at the end sometimes. Others, it would end just fine. I was able to recreate this on my Macbook as well. All I did was attempt a New-DSSession and it would intermittently hang when trying to exit. There doesn't seem to be any consistency or pattern to it unfortunately. The only workaround that has been successful is using [Environment]::Exit(0) to forcefully exit instead of exiting normally. Is this a known issue? I'm happy to provide any further debugging details if possible.

84

5

avatar

csudderth

avatar

davidwillis

Data Source Auto-Refresh Settings

Hello, I have a couple questions about how the auto-refresh works with a SQL Server data source. I notice there are a few settings that may play a role. Data Source Settings -> Settings tab -> Ping online method [image] Data Source Settings -> Advanced tab -> "Sync all vaults (background)" and "Auto-refresh": [image] File -> Background Services -> Is online tab -> "Enable checking for server availability" and "Check if the host is online": [image] How do all these work together? What is the difference between "checking for server availability" and "checking if host is online" in the last example? And what do the various settings mean on "sync all vaults (background)" dropdown in the second example? Sorry I know this is a multi-part question, and maybe some of these are for something else/do not relate to data source refresh. But I'm just wondering how this process works. Thanks!

128

5

avatar

Jacob Lafrenière

avatar

kiaarmani

Resolved

Powershell - Unable to create repository using application identity

Hello there, I am currently trying to migrate an existing script that performs batch operations from using a username and password to using an application identity. The script should create a repository using a given name, using an existing repository as template. Logging in has worked so far: $appId = $ScriptConfig.ApplicationId $appSecret = $ScriptConfig.ApplicationSecret if ([string]::IsNullOrWhiteSpace($appId) -or [string]::IsNullOrWhiteSpace($appSecret)) { throw "ApplicationId and ApplicationSecret must be configured." } if ($OverrideOptionFilePath) { $optionDir = Split-Path $OverrideOptionFilePath -Parent if ($optionDir -and -not (Test-Path $optionDir)) { New-Item -ItemType Directory -Path $optionDir -Force | Out-Null } $override = Get-RDMPowerShellOverride $override.OptionFilePath = $OverrideOptionFilePath Set-RDMPowerShellOverride } Write-LogSimple -Message "Connecting to $DvlsUrl with application id '$appId'..." -Type "INFO" $ds = New-RDMDataSource -DVLS -Name $ScriptConfig.DataSourceName -Server $DvlsUrl -ScriptingTenantID $appId -ScriptingApplicationPassword $appSecret -SetDatasource -WarningAction SilentlyContinue Set-RDMDataSource $ds Set-RDMCurrentDataSource $ds Unfortunately, trying to create a repository using the same login, yields in "Session does not seem authenticated" errors. New-DSVault -Name $NewRepositoryName -ErrorAction Stop -SecurityLevel "Standard" -IsAllowedOffline $true -AllowedRolesList ("ROLE_01", "ROLE_02") I read in the documentation that application identities have no permissions by default, but I am unsure how I would give it permission to create the vault. Here are my system permissions: [image] What permissions do I need to set / grant for this to work?

160

8

avatar

kiaarmani

avatar

James Schlackman

Powershell terminal entries do not run if the script contains a #Required directive

I started using Devolutions RDM recently and have been adding some of my commonly-used scripts as PowerShell terminal (local) entries, but I've discovered that RDM will not run any script that includes a #Requires directive, e.g. #Requires -Modules ExchangeOnlineManagement or #Requires -RunAsAdministrator If such a directive is included in the script, the entry will silently fail when configured for tabbed mode. If set to run in external mode, an exception error dialog is immediately shown when the entry is run: ArgumentOutOfRangeException - startIndex ('-1') must be a non-negative value. (Parameter 'startIndex') Actual value was -1. [image] Is this a bug or is there a configuration change I can make? I did send an error report if that helps.

165

6

avatar

James Schlackman

avatar

dmitzman

Resolved

Set-rdmsession for RDP with a RD gateway

We are preparing to move from straight RDP to utilizing a secure RF gateway. I was able to manually create a session and it worked just fine but we need to migrate all our connections so I was planning to use powershell to script it out. Problem is, I can't find in the documents how to create that object and add it to the RDMSession. Any thoughts or section of the documentation you can point me to?

169

4

avatar

dmitzman

avatar

sjames

Set-RDMUser - changing application access

Trying to work out how I can change these settings back to default Get-RDMUser appears to have boolean settings (true/false) - is there somewhere else it can be set? [image] CreateSQLServerLogin : True HasPrivateVault : False IntegratedSecurity : True Password : ServerUserType : 8 UserType : User CanAdd : True CanDelete : True CanEdit : True CanMove : True ConnectionOverrides : CreationDate : 1/1/0001 12:00:00 AM CustomSecurity : <?xml version="1.0" encoding="utf-8"?> <CustomSecurity> <IntegratedSecurity>true</IntegratedSecurity> <ContainedDatabaseUser>true</ContainedDatabaseUser> </CustomSecurity> DataSourceID : 00000000-0000-0000-0000-000000000000 GroupInfos : HasAccessLauncher : True HasAccessRDM : True HasAccessWeb : False HasAccessWebLogin : True IsAdministrator : False IsEnabled : False IsLockedOut : False IsNew : False IsOwner : False IsTemplate : False LastLockoutDate : LoginEmail :

167

2

avatar

Patrick Ouimet

avatar

bjoernramann

Get logs with Get-HubSiemLogs

Hello, I try to get our Hub-logs to transfer them into our Siem. To do this, in my script I first logon with a appkey and this looks ok because I get data with "Get-HubSystemSettings". When I try to use Get-HubSiemLogs, I get always: The api call with Hub failed. (Forbidden). To configure the access via powershell I found this docs: https://blog.devolutions.net/2021/05/new-feature-password-hub-business-powershell-module/#access-password-hub-business-with-hub-powershell-module https://docs.devolutions.net/server/web-interface/administration/security-management/applications/ What need I to do to get the logs? Thanks Bjoern

185

4

avatar

Patrick Ouimet

avatar

miccol

Resolved

Import Azure AD groups

I'm trying to fully automate the Vault creation process. To grant access to vaults I use Entra ID groups. When creating new vaults manually, I simply go to User Groups, hit "Import" then select "Azure Active Directory", filter for a certain name standard and then hit import. I then go about assigning permissions later on. I'm struggling to figure out how to automate the step above. Creating a vault is easy, assigning permissions likewise, but importing Entra ID groups...how to do that? Thanks.

192

5

avatar

miccol

avatar

Joffrey

Update token for hashicorp credential

Hi, How can I update the token for connectiontype "credential" and credentialtype "hashicorpVault" ? I tried set-rdmentrypassword , no change. thanks you The xml is: <?xml version="1.0" encoding="utf-8"?> <RDMExport> <Connections> <Connection> <ConnectionType>Credential</ConnectionType> <ID>2fbbe2fb-1f05-4d8a-9f93-34a5a8374c8c</ID> <Name>MY-VAULT</Name> <Credentials> <CredentialType>HashiCorpVault</CredentialType> <HashiCorpVaultAlwaysPromptWithList>true</HashiCorpVaultAlwaysPromptWithList> <HashiCorpVaultServer>https://my.vault.server</HashiCorpVaultServer> <SafeHashiCorpVaultToken>b3f90GoGTtHARPA76il/NDUIc+B3v9N8Qa5hZP8ROw3LvrWfOzFmRjsuA39Hin6OwdzrJbM/8b1ZulIIROEgQ5qb2iZLCfCY7T+dTL4fvwmx8nKw9mvHvISolVYWUGTHHRI6S1emUS0=</SafeHashiCorpVaultToken> </Credentials>

139

5

avatar

Joffrey

avatar

vladyslavmiachkov

Backlog

Impossible to create data source when RDM is running via powershell

Hi! I am trying to create data source via powershell. I found out that I can do it when application is not running but when app is running sqlite file or xml file doesnt create. I checked both windows and macOS. Could you check from your side? I suppose that it is a bug. Commands I've used: $s = New-RDMDataSource -SQLite -Database "/usr/local/dev/rdm_test/sqlite_test" -Name "sqlite_test" Set-RDMDatasource $s Update-RDMUI. P.S I tried to attach some screen records but had error on creating post.

192

5

avatar

vladyslavmiachkov

avatar

RDMTinkerer

How to filter AddOn entries?

Hi, I need to fetch all entries of type "Mikrotik Winbox" using PowerShell. I noticed that they have ConnectionType equal to AddOn . But then, how do I filter AddOn of specific type? I can reverse-engineer the GUID in the ConnectionSubType to be 59c4de6b-864c-4dbc-8183-489f40233004 for Mikrotik. But there are 2 questions: Is this the right way of filtering them? Is there a dictionary of the ConnectionSubTypes that I could use, and not do the guesswork? For example if I need to filter specific entries that might not (yet) exist, how can I determine its subtype other than by tedious work of creating a sample entry, and then doing the above again? Thanks.

157

4

avatar

Maxime Bernier

avatar

jordi

Unable to connect to DVLS datasource on "Clean" machine(s)

Hi, i am trying to connect to a dvls datasource with the remotedesktopmanager powershell module on a Clean windows 11 machine (just installed it) and want to connect to DVLS. The error is also appearing on server type os and a VM i work on. I constantly getting an error : DllNotFoundException - Unable to load DLL 'sqlite3secure' or one of its dependencies: the specified module could not be found. (0x8007007E) One side note on the machines i am testing with is that RDM is NOT installed. Because we are trying to automate some workflows i dont want to install (and maintain) the RDM client on our DevOps Agents. server 2022.3.12.0 remotedesktopmanager module 2022.3.1.4 Thanks

486

23

avatar

Jonathan Lafontaine

avatar

marcelgerber

Backlog

PowerShell scripting documentation

Hello. The PS documentation is always confusing. For instance, with the DVLS Server connectivity, it is not clear what we can do afterwards. How to make sure the connection is active, how to manage sessions and credentials, etc. Some full examples could already help. The same for RDM PS. I'm always struggling to make it work. Everytime I create additional datasources and have to login with my username, even though I want to connect using automatic methods. I had a case open, which provided a solution, but that doesn't seem to work for me anymore. Ideally, PS would be using a server API, so we can manage everything. Best regards. Marcel

593

10

avatar

Erica Poirier

avatar

damiendaco

Script to automate entry creation in DVLS

Hi, I created a script to create entries, for our automation process. The goal is to be able to call the script with all required parameters, from our Gitlab CI runners. I tried to create a pull request on your github but I couldn't. So I'm pasting it here instead, feel free to add it to your collection. Best regards, Damien Daco <# . SYNOPSIS Adds a single machine entry to Devolutions Server. . DESCRIPTION This script connects to a Devolutions Server instance and adds a new machine entry (RDP, SSH, Web, or VNC) to a specified vault and folder. Credentials and connection details can be provided via parameters or environment variables. . PARAMETER ServerUrl The URL of the Devolutions Server instance. . PARAMETER VaultId The ID of the vault where the entry will be added. . PARAMETER Name The display name of the machine entry. . PARAMETER HostName The hostname or IP address of the machine. . PARAMETER ConnectionType The type of connection (RDP, SSH, Web, VNC). . PARAMETER Folder The folder name where the entry will be placed. . PARAMETER Description (Optional) Description for the entry. . PARAMETER Username (Optional) Username for the connection. . PARAMETER Password (Optional) Password for the connection. . PARAMETER Domain (Optional) Domain for the connection. . PARAMETER Group The group or parent folder for the entry. . EXAMPLE pwsh Add-Entries.ps1 -Name "tsttotoweb01" -HostName "127.0.0.1" -ConnectionType "RDP" -Folder "TOTO2" -Description "TST TOTO WEB 01" -UserName "DTA01" -Password "Password1234!" -Domain "MY_DOMAIN" -Group "TESTING" . NOTES Author: Damien Daco Version: 1.0 Date: July 10, 2025 #> [ CmdletBinding ()] param ( [ ValidateNotNullOrEmpty ()] [ string ] $ServerUrl = $DVLSUrl , [ ValidateNotNullOrEmpty ()] [ string ] $VaultId = "00000000-0000-0000-0000-000000000000" , [ ValidateNotNullOrEmpty ()] [ string ] $Name , [ ValidateNotNullOrEmpty ()] [ string ] $HostName , [ ValidateNotNullOrEmpty ()] [ string ] $ConnectionType , [ ValidateNotNullOrEmpty ()] [ string ] $Folder , [ string ] $Description , [ string ] $Username , [ string ] $Password , [ ValidateNotNullOrEmpty ()] [ string ] $Domain , [ ValidateNotNullOrEmpty ()] [ string ] $Group ) # Import the Devolutions Server module if not already imported try { if ( -not ( Get-Module - Name Devolutions.PowerShell - ErrorAction Stop)) { Write-Host "Importing Devolutions.PowerShell module..." - ForegroundColor Cyan Import-Module - Name Devolutions.PowerShell - Force - ErrorAction Stop } } catch { Write-Error "Failed to import Devolutions.PowerShell module: $_ " Write-Host "Troubleshooting steps:" - ForegroundColor Yellow Write-Host "1. Verify you have permission to install modules" - ForegroundColor Yellow Write-Host "2. Run 'Install-Module Devolutions.PowerShell -Scope CurrentUser -Force' manually" - ForegroundColor Yellow Write-Host "3. Check for any PowerShell execution policy restrictions" - ForegroundColor Yellow exit 1 } [ string ] $ApplicationID = $env:DS_USER [ string ] $ApplicationSecretKey = $env:DS_PASSWORD [ string ] $DVLSUrl = $env:DS_URL [ securestring ] $SecApplicationSecretKey = ConvertTo-SecureString $ApplicationSecretKey - AsPlainText - Force [ pscredential ] $Creds = New-Object System.Management.Automation.PSCredential ( $ApplicationID , $SecApplicationSecretKey ) # Add a new machine entry to Devolutions Server function Add-MachineEntry { param ( [ string ] $Name , [ string ] $HostName , [ string ] $ConnectionType , [ string ] $Folder , [ string ] $Description , [ string ] $Username , [ string ] $Password , [ string ] $Domain , [ int ] $Port , [ string ] $Group , [ string ] $VaultId ) try { # Check if entry already exists Write-Host "Checking if entry ' $Name ' already exists ..." - ForegroundColor Cyan $ExistingEntry = Get-DSEntry - VaultId $VaultId - FilterValue $Name - ErrorAction SilentlyContinue if ( $ExistingEntry ) { Write-Host "Entry ' $Name ' already exists. Skipping creation." - ForegroundColor Yellow exit 0 } else { Write-Host "Entry ' $Name ' does not exists. Creating..." - ForegroundColor Green # Create entry parameters based on connection type $EntryParams = @ { Name = $Name HostName = $HostName Description = $Description VaultId = $VaultId Group = $Group } if ( -not [ string ]::IsNullOrEmpty( $Username ) -and -not [ string ]::IsNullOrEmpty( $Password )) { $EntryParams .Add ( 'Username' , $Username ) $EntryParams .Add ( 'Password' , $Password ) } # Add port if specified if ( $Port -gt 0 ) { $EntryParams .Add ( 'Port' , $Port ) } # Create entry based on connection type switch ( $ConnectionType .ToLower ()) { "rdp" { New-DSRDPEntry @EntryParams } "ssh" { New-DSSSHShellEntry @EntryParams } "web" { New-DSWebEntry @EntryParams } "vnc" { New-DSVNCEntry @EntryParams } default { Write-Warning "Unsupported connection type: $ConnectionType . Using generic connection." New-DSConnection @EntryParams } } Write-Host "Added $ConnectionType entry for $Name " - ForegroundColor Green } } catch { Write-Error "Failed to add entry for $Name `: $_ " exit 1 } } # Main script execution try { # Connect to Devolutions Server $Response = New-DSSession - Credential $Creds - BaseURI $DVLSUrl - AsApplication Add-MachineEntry - Name $Name - HostName $HostName - ConnectionType $ConnectionType ` - Description $Description - Username $Username ` - Password $Password - Domain $Domain ` - Group " $Group \ $Folder " - VaultId $VaultId # -Port ([int]::TryParse($Machine.Port, [ref]$null) ) Write-Host "Script completed successfully!" - ForegroundColor Green } catch { Write-Error "An error occurred: $_ " exit 1 } finally { # Close the connection to Devolutions Server Close-DSSession Write-Host "Disconnected from Devolutions Server" - ForegroundColor Cyan }

169

2

avatar

Patrick Ouimet

avatar

KevGue

Implemented

Create X.509 certificate entry with PowerShell Module

Hello, we would like to automate various certificate processes and leverage the Devolutions PowerShell module for this. On the GUI RDM you can create an X.509 certificate entry, supplying a public-private key pair, which gets stored in the database. My question is can you create a functioning X.509 entry and also retrieve the information from it using the PowerShell module? I have checked the XML for an entry and I can't see any easy way to accomplish this. If not we will have to pick a different entry for this. Thank you in advance.

304

3

avatar

Maxime Bernier

avatar

MKrupa

Resolved

Unable to connect to RDMDataSource via Application Identity

Hi everyone, I am currently working on using PowerShell to automatically export all passwords stored in my vault to a .csv file. This is to be done via a scheduled task on my DVLS server. The server has the latest versions of DVLS Console, Server, RDM and Devolutions.PowerShell installed - so everything is up to date. My aim is to carry out authentication via an appkey and an appsecret, as no user interaction is planned. However, executing the following code opens a browser window for interactive login - which is not desired in my scenario. The application identity used has the required access rights both via DVLS groups and directly to the vault. If I log in via the open browser window, access works for a short time, but only as long as the Powershell session is active. The next time I run the script, the login window appears again. Code: Import-Module Devolutions.PowerShell $dsname = "dvls" $dsurl = "https://[DVLS-URL]" $appkey = "XXXXXX" $appsecret = "XXXXXXX" $ds = New-RDMDataSource -DVLS -Name $dsname -Server $dsurl -ScriptingTenantID $appkey -ScriptingApplicationPassword $appsecret -SetDatasource -WarningAction SilentlyContinue Set-RDMDataSource $ds #Location of the CSV file you want to export the RDM sessions to $exportFileName = "C:\Temp\EXPORTS\RDMCredentialsData_$(get-date -f yyyy-MM-dd).csv" Set-RDMCurrentRepository [Vault-ID] Update-RDMUI #Get all the sessions in the current vault $RDMsessions = Get-RDMSession | Where-Object {$_.ConnectionType -ne "Group"} | Select-Object -Property Name, ID, ConnectionType, Group, HostFull #Iterate in every session foreach ($session in $RDMsessions){ #Add the username field $session | Add-Member -MemberType NoteProperty "Username" -Value (Get-RDMSessionUserName -ID $session.id) #Add the password field as clear text to the session $session | Add-Member -MemberType NoteProperty "Password" -Value (get-RDMSessionPassword -ID $session.id -AsPlainText) #Export the session to a CSV file to the path configured earlier. $session | Export-Csv -Path $exportFileName -Append -NoTypeInformation } Thank you in advance for any help. Marco

248

10

avatar

Maxime Bernier

avatar

kiaarmani

Resolved

Attachments inside RDM export not being imported

Hello there, We are currently trying to migrate from a monolithic repository (which contains a folder for each client) to a structure that is one repository per client. For that I would like to export all folders as RDM files, create a new repository and then import the contents back into the new repository. Here is the code I am trying to use: try { # Create temp file for export $tempExportFile = "C:\Dev\_temp\RDM\" + $clientFolder.Name + ".rdm" # Export data Export-RDMSession -XML -Sessions $clientEntries -IncludeCredentials -IncludeAttachements -IncludeDocumentation -Path $tempExportFile -ErrorAction Stop -ForcePromptAnswer ([System.Windows.Forms.DialogResult]::Yes) Write-LogSimple -Message "Data exported to: $tempExportFile" -Type "INFO" # change repo Set-RDMCurrentRepository -Repository $targetRepo -ErrorAction Stop # import into new repo Import-RDMSession -Path $tempExportFile -ErrorAction Stop -ForcePromptAnswer ([System.Windows.Forms.DialogResult]::Yes) -DuplicateAction "Ignore" | Set-RDMSession Write-LogSimple -Message "success" -Type "ACTION" } catch { Write-LogSimple -Message "error '$($clientFolder.Name)': $($_.Exception.Message)" -Type "ERROR" # delete temp file if (Test-Path $tempExportFile) { Remove-Item -Path $tempExportFile -Force -ErrorAction SilentlyContinue } } For the Import-RDMSession command I tried using the -SetSession parameter too, with the same result. The entries (i.e. credentials) and folders are present in the new repository, while the attachments are not. Importing the exported .rdm file using the desktop application will import the attachments successfully. I tried placing the attachment into the root, on folder level and on a credential. None of them are imported. The export seemingly captures them indicated by the file size (38 MB), which also gets larger the more attachments I place. I tried this with Devolutions.PowerShell 2025.2.0, 2025.1.5 and 2025.1.4, with no success. Please advise. Sincerely, Kia Armani

253

3

avatar

Maxime Bernier

avatar

Iain

Backlog

Running Powershell script

Hi, After a little help and understanding, not very experienced with scripts using them in RDM. We have a simple PowerShell script to disable or enable alarms on ESXi hosts. Outside of RDM works great, added into RDM and used the parameter feature and got it to load the prompt for vcenter and creds. Worked great also! Decided to up the ante and try to work out how I can make it so you can run it against any vcenter entry and it would pass through the host, username and password of the entry to the param fields and then run the script.. Won't lie.. Chatgpt has been asked.. Here is the PowerShell script param ( [string]$vcenter, [string]$username, [string]$password ) # Load PowerCLI Import-Module VMware.PowerCLI # Suppress cert warnings Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null # Convert plain text password to secure string $securePassword = ConvertTo-SecureString $password -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential ($username, $securePassword) # Connect to vCenter using credentials try { Connect-VIServer -Server $vcenter -Credential $cred -ErrorAction Stop Write-Host "Connected to $vcenter successfully." } catch { Write-Warning "Failed to connect to $vcenter. Exiting script." exit } # Get AlarmManager view $alarmMgr = Get-View AlarmManager # Get all clusters $clusters = Get-Cluster foreach ($cluster in $clusters) { Write-Host "`nCluster: $($cluster.Name)" $choice = Read-Host "Enable or disable alarm actions for this cluster and its hosts? (enable/disable)" switch ($choice.ToLower()) { "enable" { $actionState = $true } "disable" { $actionState = $false } default { Write-Host "Invalid input. Skipping cluster $($cluster.Name)." continue } } # Enable/Disable alarm actions on the cluster $alarmMgr.EnableAlarmActions($cluster.ExtensionData.MoRef, $actionState) Write-Host "Cluster '$($cluster.Name)' alarm actions set to $actionState." # Apply to each host in the cluster $vmhosts = Get-VMHost -Location $cluster foreach ($vmhost in $vmhosts) { $alarmMgr.EnableAlarmActions($vmhost.ExtensionData.MoRef, $actionState) Write-Host " Host '$($vmhost.Name)' alarm actions set to $actionState." } } Write-Host "`nDone." Here are my parameters with values set: [image] It appears to partly work.. as I see the vcenter host name pull through, however I then get several errors: [image] Clearly a lack of understanding on my part!

300

6

avatar

Patrick Ouimet

avatar

den_zorg

Resolved

Changes done by PowerShell are not available for RDM on MacOS

Hello, My setup: MacOS Sequoia 15.4.1 Remote Desktop Manager 2025.1.13.3 PowerShell 7.5.0 Devolution.Powershell module 2025.1.3.0 Trial license, valid, not expired. Issue: I've created new XML data source like this: PS /Users/user> $s = New-RDMDataSource -XML -Filename 'XML_DS_powerShell' -Name 'XML_DS_powerShell' PS /Users/user> Set-RDMDatasource $s PS /Users/user> Update-RDMUI After that I've checked is it created: PS /Users/user> Get-RDMDataSource < Previously created data sources > ID : 358a2b5c-f4cc-4a66-a52d-0e3c039a9cf9 IsConnected : False IsOffline : False Name : XML_DS_powerShell Type : Xml Issue is, that RDM app doesn't see this new data source. Also file XML_DS_powerShell is not created, directory with data source ID is also not created, I've checked RDM directory '~/Library/Application Support/com.devolutions.remotedesktopmanager/' where all other data sources are located. Only after I've created new RDP entry in this new data source, using PowerShell, file and directory appeared in RDM directory. But RDM app still can't see this new data source. Is it expected? Do I missed some command? Regards, Denys

253

8

avatar

Patrick Ouimet

avatar

lukas06

Resolved

Connect to Devolution Server via Application identities

Hello, I updated to Devolution Server 2025.1.4.0 from 2024.3.x and the Devolutions.Powershell Update to 2025.1.2. Since the update I can't connect to my Devolution Server via Powershell. This is my script to connect: $key=(Get-Content -Path D:\PS_API\appkey.txt | ConvertTo-SecureString -Key (Get-Content -Path D:\PS_API\appkeyEncryptedPass.reg)) $appkeytmp = new-object -typename System.Management.Automation.PSCredential -argumentlist "Username",$key $appkey=$appkeytmp.GetNetworkCredential().password $secret=(Get-Content -Path D:\PS_API\appsecret.txt | ConvertTo-SecureString -Key (Get-Content -Path D:\PS_API\appsecretEncryptedPass.reg)) $appsecrettmp = new-object -typename System.Management.Automation.PSCredential -argumentlist "Username",$secret $appsecret=$appsecrettmp.GetNetworkCredential().password $dsname = "XXX" $dsurl = "https://XXX/dvls" $ds= New-RDMDataSource -DVLS -Name $dsname -Server $dsurl -ScriptingTenantID $appkey -ScriptingApplicationPassword $appsecret -SetDatasource Set-RDMDataSource $ds The command Get-RDMDataSource XXX return IsConnected False What I am doing wrong or what has changed after the update?

340

8

avatar

lukas06

avatar

cryorig

Resolved

Microsoft.Data.SqlClient error when setting current RDM DS

Powershell 7.5.1 RDM 2025.1.31 Devolutions.Powershell 2025.1.3 Backend MSSQL 2019 Host OS: Windows Server 2022 (RDS) Currently in the process of moving some of our scripts to PS7 and have the following Issue with RDM/Devolutions.Powershell Get-RDMDataSource -Name XYZ | Set-RDMCurrentDataSource Set-RDMCurrentDataSource: Could not load file or assembly 'Microsoft.Data.SqlClient, Version=6.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'. The located assembly's manifest definition does not match the assembly reference. (0x80131040) The same happens with Get-RDMCurrentDataSource. I then updated RDM to 2025.1.34 and Devolutions.Powershell to 2025.1.4, but the Issue stayed the same. Is there anything that can be done from my side or do i have to wait for a fix/update of the Powershell Module? BR, Stefan

263

5

avatar

cryorig

avatar

info01

rdm powershell with sql connection, sql connection does not show

we have rdm with sql connection however i can only connect to the local connection. The sql database is not shown at all using the powershell commandlets.How can i connect to the correct SQL connection ? We use powershell 5.1 PS D:\Beheer\Alex> Get-RDMInstance ApplicationVersion OptionFilename ------------------ -------------- 2022.3.1.8 C:\Users\TEMP.DF0.010\AppData\Roaming\Devolutions\RemoteDesktopManager\RemoteDesktopManager.cfg PS D:\Beheer\Alex> Get-RDMDiagnostic Serial LicenseType IsLicenseValid IsLicenseExpired ------ ----------- -------------- ---------------- False True PS D:\Beheer\Alex> Get-RDMSession Get-RDMSession : Connection not found. [image]

207

2

avatar

Maxime Bernier

1 - 25 of 515 items