Powershell problem after OS upgrade

Powershell problem after OS upgrade

avatar

Good day,
We have upgraded OS from "Windows Server 2016" to "Windows Server 2022". Everything runs fine, except RDM Powershell. After "Loading RDM CmdLet (Module)" we only get following error:
 
Set-RDMCurrentDataSource : The term 'Set-RDMCurrentDataSource' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
 
Any ideas what might be missing? Please note we are still running an older version 2019.1.41.0, but this will be upgraded later as the next step.
 
Thank you.
 
Best regards
Michael

All Comments (9)

avatar

Hello Michael,

Thank you for reaching out to us regarding this,

Did you follow this knowledge base article for the PowerShell module installation on your new machine?
https://docs.devolutions.net/rdm/powershell-scripting/powershell-module/

Let me know,

Best regards,

Samuel Dery

avatar

Hello Samuel,

Thanks for the quick response. That works when we start PowerShell 7 manually, however when we open PowerShell from within RDM "Tools" it still opens PowerShell 5.1. Furthermore as soon as we execute a command like "$sessions = Get-RDMSession" this command is executed, but our SQL DataSource gets removed from RDM configuration.

I assume this is expected since we are currently using old version 2019.1.41.0?

Any chance to get it running again with Powershell 5.1 until we upgraded our version?

Thanks again.

Best regards
Michael

avatar

Hello Michael,

Thank you for your feedback.

As you use an older version, you should be able to run the script from PowerShell 5.

Do you import the module using the following command at the beginning of your PowerShell script?

 Import-Module "C:\Program Files (x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1" 


Best regards,

Érica Poirier

avatar

Hello Erica,
Yes, the above import command did execute without any output, but when running "Get-Module RemoteDesktopManager.PowerShellModule" the result is:

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 1.0 RemoteDesktopManager.PowerShellM...

So no exported commands... Any ideas how that can be fixed?

Thank you.

Best regards
Michael

avatar

Hello Michael,

Do you get any output using the following command after importing the module?

Get-Command -Module RemoteDesktopManager.PowerShellModule


We will test this on a Windows 2022 server to see if we have the same problem.

Best regards,

Érica Poirier

avatar

Hello Erica,

"Get-Command -Module RemoteDesktopManager.PowerShellModule" execute with no output. We have already tested a new installation on a Windows Server 2022 and it works fine. So assume it is an issue with the OS Upgrade...

Are there maybe any dependencies which might required to be re-installed?


Best regards
Michael Last

avatar

Hello Michael,

Could you verify if the .Net Framework 4.8 is installed on that server?

Once this framework is installed, I no longer get the error message.

Let us know if that works for you!

Best regards,

Érica Poirier

avatar

Hello Erica,

.Net Framework 4.8 was already installed since it is part of the OS. I have updated to 4.8.1, but the problem is still the same....

Best regards
Michael

avatar

Hello Michael,

Are you running the PowerShell as another user or as an administrator?

If that still doesn't help, please email service@devolutions.net with a reference to this topic, and I will send you a link to book a support session.

Best regards,

Érica Poirier