Forum / Remote Desktop Manager - PowerShell Repository

Set-RDMSession throw 'Connection has invalid group specified' (13.5.0.0)

  • Create an Issue
  • Cancel

This don't work anymore. I have dumped it down for clarity.


$session = New-RDMSession -Name bla -Group "bla bla" -Type RDPConfigured
Set-RDMSession $session

but this work:


New-RDMSession -Name bla -Group "bla bla" -Type RDPConfigured -SetSession


what give?

Clock2 yrs

Why did this get removed from the bug section?
This is a bug in 13.5.0.0.
This worked before upgrading.

Clock2 yrs

Hi,

It's because your data source doesn't allow virtual groups.

You can't edit the group of a session and save it if the group doesn't exist.

In your case, the group "bla bla" doesn't exist in your data source. You need to create it before, like you would do it in the UI if you want to create a RDP and the group "bla bla doesn't exist".

New-RDMSession will work the same way in the next version.

AllowVirtualFoldersSettings

RDPVirtualFoldersNotAllowedSettings

Best regards,

Olivier Désalliers

signaturesignature

AllowVirtualFoldersSettings.png
RDPVirtualFoldersNotAllowedSettings.png
Clock2 yrs

Hey Olivier,
I am unable to find that setting.
I am using a XML as datasource.
But I am also creating the folder before the above.
Which I also had to fix like above:



$entry = New-RDMSession -type group -Name $folder -SetSession

before I had

$entry = New-RDMSession -type group -Name $folder
Set-RDMSession $entry

this fixed my folder creating, but sessions are still nok getting created.
like this:


$newsession = New-RDMSession -Group "Rootfolder\00 Toolkit" -Name "Toolkit" -type WebBrowser
$newsession.PinEmbeddedMode = [Devolutions.RemoteDesktopManager.DefaultBoolean]::False
$newsession.ConnectionSubType = "Default"
$newsession.WebBrowserUrl = "https://forum.devolutions.net
$newsession.Name = "https://forum.devolutions.net
Set-RDMSession $newsession

Clock2 yrs

Hi,

If you write $group = Get-RDMSession -Name RootFolder and $group2 = Get-RDMSession -Name '00 Toolkit'. Are you able to get both sessions?

Best regards,

Olivier Désalliers

signaturesignature

Clock2 yrs

yes I am.
this also works:


$newsession = New-RDMSession -Group "Rootfolder\00 Toolkit" -Name "Toolkit" -type WebBrowser -SetSession
$newsession.PinEmbeddedMode = [Devolutions.RemoteDesktopManager.DefaultBoolean]::False
$newsession.ConnectionSubType = "Default"
$newsession.WebBrowserUrl = "
https://forum.devolutions.net
$newsession.Name = "https://forum.devolutions.net
Set-RDMSession $newsession

Clock2 yrs

Hello,

Please allow me to jump in.

I tested your script and the errors i'm getting are always related to the Invalid Group when Set-RDMSession is called.
You also have to make sure that the folders are not virtual.
For instance, if you call a
New-RDMSession -Group "Rootfolder\00 Toolkit" -Name "Toolkit" -type WebBrowser -SetSession
And "RootFolder" doesn't exist, you will be creating a Physical Folder within a virtual one, which can lead to the Invalid Folder error.
Another thing that could happen, would be that sometime, the cache of the DataSource might not be fully synced with the actual RDM Interface. To prevent such behavior, after creating a folder, and before adding a session in that folder, you should perform a Update-RDMUI


So here's an example of what it could look like:


New-RDMSession -type group -Name "RootFolder" -SetSession
Update-RDMUI
New-RDMSession -type group -Name "00 Toolkit" -Group "RootFolder" -SetSession
Update-RDMUI
$newsession = New-RDMSession -Group "RootFolder\00 Toolkit" -Name "Toolkit" -type WebBrowser -SetSession
$newsession.PinEmbeddedMode = [Devolutions.RemoteDesktopManager.DefaultBoolean]::False
$newsession.ConnectionSubType = "Default"
$newsession.WebBrowserUrl = "https://forum.devolutions.net"
$newsession.Name = "https://forum.devolutions.net"
Set-RDMSession $newsession


Eventually, using the -SetSession in the New-RDMSession will give errors if the said folder doesn't exists.


The issue when creating a group this way is internally fixed and will be available in the next RDM version:
$entry = New-RDMSession -type group -Name $folder
Set-RDMSession $entry


Hope this helps,

Regards,



Alex Belisle

signaturesignature

Clock2 yrs

okey, so the last "fix"/workaround is to add the Update-RDMUI after the new folder.
Why is this needed now?

Clock2 yrs

Hello,

Since virtual folders were allowed, the UI did not need to update, because the virtual folder was already in the cache and not and the Database.

EDIT : In fact, at the entry Creation, since the virtual folder was allowed it would'n bother verify if the folder was existing.
Hence the Update-RDMUI is the way to make sure that the Cache and the DB are fully synced.

Hope that answers well.

Best Regards,



Alex Belisle

signaturesignature

Clock2 yrs

Did this ever get fixed?
I'm getting the same issue in version 13.6.2.0

This is what causes the error

$session = New-RDMSession -Group ("Customers\" + $app.customer) -Name ("Customers\" + $app.customer + "\" + $app.name) -TemplateID "8F04F52A-B976-44C8-B819-3996B1D6F2F5" -Type "TemplateGroup" -SetSession;
Update-RDMUI
Set-RDMSession $session;


The "Customers/$app.customer" folder does indeed already exist, so it's not a virtual folder thing that I can see

Clock2 yrs

Hello,

I couldn't find the exact version in which this was fixed, but I'm working with the latest (13.6.7.0) and it works.
Could you update and test again?

Regards,



Alex Belisle

signaturesignature

Clock2 yrs