Get-RDMSession: Connection not found in 2021.2.0.30

Get-RDMSession: Connection not found in 2021.2.0.30

avatar

Hello, within RDM I have a script that makes the following call
$RDMServers = Get-RDMSession |
where {$_.ConnectionType -eq "RDPConfigured"}

In v2021.2.0.22 of the RDM Powershell module, this works fine. After installing the latest package, a simple Get-RDMSession fails with the error

Get-RDMSession : Connection not found.
At line:1 char:1
+ Get-RDMSession
+ ~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-RDMSession], Exception
+ FullyQualifiedErrorId : 0,RemoteDesktopManager.PowerShellModule.GetRDMSessionComman

Is this a known issue or something that needs to be changed in my scripts with newer versions?

All Comments (9)

avatar

Hi,

Get-RDMSession : Connection not found usually mean your connection list is empty and the leading cause is your data source isn't connected,
Can you try running the following command?

Get-RDMCurrentDataSource


This isn't a known issue but you certainly shouldn't have to adapt your scripts every time a module update is released.

Jonathan Lafontaine

avatar

Get-RDMCurrentDataSource returns my datasource - though it show IsConnected as false.
forum image
It shows as this for both .30 and .22. One of them works, the other doesn't, and this is occurring for multiple team members.

avatar

Are you connecting to a SQL Server or Azure database?
Using which login method?

Jonathan Lafontaine

avatar

SQL Server Database - AD integration for login. We also have 2 Factor enabled on the datasource.

avatar

TOTP?

Jonathan Lafontaine

avatar

Yes, TOTP
forum image

avatar

If you are not prompted to enter your 2FA code, I think I've managed to replicate your issue.
I will release a new module version once it is fixed.

Jonathan Lafontaine

avatar

Thanks! It does not prompt - I did report the no prompt here in a similar issue: https://forum.devolutions.net/topics/36276/notimplementedexception-when-running-rdm-powershells-getrdmsession-com#155564

avatar

Hi,

I just released 2021.2.0.31 that should fix your issue.
Let me know if it works or if anything else comes up.

Regards

Jonathan Lafontaine