since update to 13.5.4 the following script does not return any rdm-sessions:
Import-Module "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"
$list = Get-RDMDataSource
Set-RDMCurrentDataSource $list[0]
Get-RDMSession
# no sessions in the output
I have to set a different datasource first and then change to list[0] to make it working.
Import-Module "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"
$list = Get-RDMDataSource
Set-RDMCurrentDataSource $list[1] # Different DataSource
Set-RDMCurrentDataSource $list[0]
Get-RDMSession
# sessions are in the output now
I am running the scripts from normal powershell and ot from the PowerSehll-Tool in RDM
Could you please check why this is not working
Hello,
I will assign this to one of our tech and move your post into the PowerShell forum as well.
Best regards,
Jeff Dagenais
Hello,
Before your Get-RDMSession, simply call tthe cmdLet Update-RDMUI;
This should look look this
Import-Module "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"
$list = Get-RDMDataSource
Set-RDMCurrentDataSource $list[0]
Update-RDMUI
Get-RDMSession
# this should output your sessions
Hope this helps.
Regards,
Alex Belisle
Thanks Alexandre! This worked great for me. I wasn't the original poster, but thought it would be helpful if you knew that this worked.