Hello,
I was out of office for a month and recently upgraded to 2021.2.16.0, which brought with it the new way of powershell handling.
I read the patch notes and installed the new module from PSGallery.
Since then, none of my attempts to communicate with RDM through powershell seem to work. First off, the module is not reading the settings from the application - not sure if this is intended.
Executing "Get-RDMDataSource" returned only a local one, and not the remote one defined in the application.
I tried creating it like this:
$ds = New-RDMDataSource -IntegratedSecurity -name RDM-SQL -SQLServer -Server sqlserver -SetDataSource -DataBase RDM-DB
(values lifted directly from the application)
This appears to work, it is listed in "Get-RDMDataSource". I then tried setting it as active:
Set-RDMCurrentDataSource $ds
However, the connection is never actually made to the database.
Get-RDMDataSource shows "IsConnected : False IsOffline : False", and I can't figure out how to change this.
Running something like "Get-RDMSession" in this state gives an error "Connection not found" (translated from german, original "Verbindung nicht gefunden").
I found a similar issue here, but no solution:
https://forum.devolutions.net/topics/35950/problem-with-changing-the-data-source
I'm also having lots of issues after upgrading both my RDM (2021.2.16.0) and PowerShell module (2021.2.0.18) to the latest versions at the time of writing.
For me, Get-RDMCurrentDataSource returns the current data source information but the commands to get credentials out of credential sessions is completely broken!!
Get-RDMSessionDomain -Session $CSession
Get-RDMSessionUserName -Session $CSession
Get-RDMSessionPassword -Session $CSession
all return the following error
Get-RDMSessionPassword : Object reference not set to an instance of an object.
At line:1 char:1
+ Get-RDMSessionPassword -Session $CSession
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-RDMSessionPassword], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,RemoteDesktopManager.PowerShellModule.GetRDMSessionPasswordCommand
This is such a critical issue for us and in all my years using RDM I've never seen a botched release such as this !!
Hi,
What version of the PowerShell module are you running? You can find out by executing Get-RDMInstance.
The latest version is 2021.2.0.18.
Also make sure the path to the option file shown matches the one RDM shows in Options -> Avanced (completely at the bottom, RDM will show the path to the RemoteDesktopManager.cfg it is using).
Regards
Jonathan Lafontaine
@aroth
I've published version 2021.2.0.19 of the Remote Desktop Manager PowerShell module that should fix your issue.
If you do experience other issues, let me know, I'll try to fix them as fast as possible.
Regards
Jonathan Lafontaine
@aroth
I've published version 2021.2.0.19 of the Remote Desktop Manager PowerShell module that should fix your issue.
If you do experience other issues, let me know, I'll try to fix them as fast as possible.
Regards
I can confirm that after updating the module to version 2021.2.0.19 the issue is resolved.
thank you!
Hi,
What version of the PowerShell module are you running? You can find out by executing Get-RDMInstance.
The latest version is 2021.2.0.18.
Also make sure the path to the option file shown matches the one RDM shows in Options -> Avanced (completely at the bottom, RDM will show the path to the RemoteDesktopManager.cfg it is using).
Regards
Ahh thank you, I feel like I have found the issue.
Get-RDMInstance returns a config file path that is incorrect - it points to "%localappdata%\Devolutions\RemoteDesktopManager\RemoteDesktopManager.cfg" which does not exist
However, according to RDM options (and my harddrive), the InstallDir is "D:\Programs\RDM". The "RemoteDesktopManager.cfg" file is also in that location.
How do I tell the Powershell module to use the correct config? There is no "Set-RDMInstance" command :(
You can use the PowerShellOverride to achieve that.
$override = Get-RDMPowerShellOverride $override.OptionFilePath = "D:\Programs\RDM\RemoteDesktopManager.cfg" Set-RDMPowerShellOverride
And then restart your PowerShell session.
Jonathan Lafontaine
You can use the PowerShellOverride to achieve that.
$override = Get-RDMPowerShellOverride
$override.OptionFilePath = "D:\Programs\RDM\RemoteDesktopManager.cfg"
Set-RDMPowerShellOverride
And then restart your PowerShell session.
Thank you, this does indeed override the path (confirmed with Get-RDMInstance).
Now, if I re-create the datasource (New-RDMDataSource as in the OP), it is immediately added (Get-RDMDatasource confirms this).
This is surprising to me, as I expected I have to run Set-RDMDatasource first).
Afterwards I can use Set-RDMCurrentDatasource to switch, and the connection is online!
This is not persistent, however. Opening a new Powershell session still shows the correct config path, but once again I only have the local datasource.
What do I need to do to save this information?
Well I ended up reinstalling to C:\. Works as expected now.
Glad to know everything is working fine now.
To answer your question, Set-RDMDataSource $newDataSource would have saved the data source to your cfg file instead of simply existing in memory.
Jonathan Lafontaine