Get-RDMDataSource Can't connect after update to PS module

Implemented

Get-RDMDataSource Can't connect after update to PS module

avatar

Hi Team

This is extremely infuriating. We have business critical processes which rely on being able to access information in our RDM database, and judging by comments in this forum you appear to have updated the product without full testing and without allowing any rollback to a previous version of the module.

I have downloaded the new module from the psgallery.

C:\> Get-Module -ListAvailable -Name "RemoteDesktopManager" | ft -auto


    Directory: C:\Users\user\Documents\WindowsPowerShell\Modules


ModuleType Version     Name                 ExportedCommands
---------- -------     ----                 ----------------
Binary     2021.2.0.24 RemoteDesktopManager {Add-RDMRoleRepositoryAccess, Add-RDMRoleToUser, Add-RDMSessionAttachment, Add-RDMUserRepositoryAccess...}

C:\> Get-RDMDataSource -Name "-SQLCluster"
Unable to connect to the data source.
Do you want to go in offline mode?
[] Yes  [] No  [?] Help NotImplementedException - The method or operation is not implemented.

   at RemoteDesktopManager.UIService.set_MessageShown(Boolean value)
   at Devolutions.RemoteDesktopManager.Business.GoogleAuthenticatorTwoFactorDescriptor.Validate(String token, String accountName)
   at Devolutions.RemoteDesktopManager.Business.DataSources.BaseConnectionDataSource.UnlockTwoFactor(Boolean ignoreTwoFactorChecked)
   at Devolutions.RemoteDesktopManager.Managers.LockManager.EnsureDataSourceUnlockedTwoFactor(BaseConnectionDataSource dataSource)
   at Devolutions.RemoteDesktopManager.Managers.ConnectionManager.LoadConnectionsFromDataSource(ConnectionEngine engine, Boolean hasChanged)
   at Devolutions.RemoteDesktopManager.Managers.ConnectionManager.LoadConnections(BaseConnectionDataSource dataSource)



Our datasource is protected using MFA - in the past this command would present the MFA prompt to allow the script to connect.

While you develop a fix for this, please can I have access to the previous version of the module? Is there an old version of the RDM download I can access?

Thanks

All Comments (10)

avatar

Hello,
You can try to install RDM 2021.1.44 in another folder:

https://remotedesktopmanager.com/home/previousversions

You might have to reconfigure your data source. The legacy PowerShell will be installed in this previous version.

Regards

David Hervieux

avatar

When I try to install the older version it simply says that a newer version is already installed, and I have no option to continue.

If I download the binary package and try to import the module from there, I get the following:

Import-Module : Could not load file or assembly 'file:///C:\temp\Devolutions.RemoteDesktopManager.Bin.2021.1.44.0\RemoteDesktopManager.PowerShellModule.dll' or one of its
dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module .\RemoteDesktopManager.PowerShellModule.psd1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand


I have also tried adding the extracted path to $env:path, but that doesn't help at all, same message as above.


I can't remove the latest version and install the older one, as the database has been upgraded.


Please assist! Do I need to log a support ticket?

avatar

Hello,

Please make sure you downloaded the RDM .zip, then extract it to the desired path.

Also, make sure you are using PowerShell 5.1 to load the module, 7.1 is only supported with the new module

Then, run the following commands:

Uninstall-Module RemoteDesktopManager
#close PowerShell and re-open it
Import-Module "pathofzip\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"


It should load properly afterwards.

Note that if you are using a SQL data source, the administrator may have enabled the automatic version management, so you may need to modify the minimal version to 2021.1.44. The same is true with a Devolutions Server data source.

Best regards,

Richard Boisvert

avatar

Hi, still no luck I'm afraid. The old module doesn't import, even with the new module removed and powershell restarted. Tried both as user and administrator with the same result.

PS C:\Windows\system32> cd C:\temp\Devolutions.RemoteDesktopManager.Bin.2021.1.44.0\
PS C:\temp\Devolutions.RemoteDesktopManager.Bin.2021.1.44.0> Import-Module .\RemoteDesktopManager.PowerShellModule.psd1

Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run
C:\temp\Devolutions.RemoteDesktopManager.Bin.2021.1.44.0\RemoteDesktopManager.PowerShellModule.dll-Format.ps1xml?
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): r
Import-Module : Could not load file or assembly
'file:///C:\temp\Devolutions.RemoteDesktopManager.Bin.2021.1.44.0\RemoteDesktopManager.PowerShellModule.dll' or one of
its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module .\RemoteDesktopManager.PowerShellModule.psd1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand


avatar

Hello,

If you open the 2021.1.144 RDM client (RemoteDesktopManager64.exe), is the PS module able to load properly? Tools > PowerShell (RDM CmdLet)

forum image

Best regards,

Richard Boisvert

avatar

Hi Richard

Sorry to be digging up an old thread - we had to put a workaround in place with manual credential entries etc due to the issue above, and am only now getting back to this now that we're going into a quiet period.

We're obviously now on a later release of both the PS Module (2021.2.0.34) and the RDM Client (2021.2.27.0 64-BIT)

I now see that the connection is requesting a key - I have tried entering the OTP code, however I suspect this isn't what it's looking for? We are connecting to an onprem SQL data source with MFA configured.

As you can see the connection seems to be ok, but whenever I try to get details from a Session entry, I get access denied.

forum image
forum image

avatar

Hello,

If you have MFA enabled to connect to your SQL instance, you will need to enter the passcode to be able to establish the connection.

I was able to replicate your issue with retrieving the username of a session in the private vault, I will open an internal ticket to the engineering team and will keep you updated.

Best regards,

Richard Boisvert

avatar
Hello,

If you have MFA enabled to connect to your SQL instance, you will need to enter the passcode to be able to establish the connection.

I was able to replicate your issue with retrieving the username of a session in the private vault, I will open an internal ticket to the engineering team and will keep you updated.

Best regards,


Thankyou!
Additionally, we get the same Access Denied message when using Get-RDMSessionPassword from the private vault. I haven't actually got as far as testing/requesting any info from the main vault yet.

avatar

Hello,

My pleasure, thank you for reporting the bug. I have added the information relating to Get-RDMSessionPassword to the engineering ticket.

Best regards,

Richard Boisvert

avatar

Hello,

A new version of the RDM PS module has been released (2022.1.0.4) that contains a new cmdlet to fix your issue: Get-RDMUserVaultSessionUserName

Best regards,

Richard Boisvert