Users

All Posts (17)

avatar

patrick05

Get templateIDs with powershell command

avatar
avatar
avatar

thanks, that's exactly the command I was looking for!

Get templateIDs with powershell command

avatar
avatar
avatar

I have a powershell script that I've used for the past few years to create new sessions, but today it's returning:

WARNING: No template group found with the id 8f04f52a-b976-44c8-b819-3996b1d6f2f5

Set-RDMSession : Cannot bind argument to parameter 'Session' because it is null.

At C:\Program Files (x86)\Devolutions\Remote Desktop Manager\updateApplianceSessions.ps1:47 char:18

+ Set-RDMSession $session;

+ ~~~~~~~~

+ CategoryInfo : InvalidData: (:) [Set-RDMSession], ParameterBindingValidationException

+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,RemoteDesktopManager.PowerShellModule.SetRDMSessionCommand

This is caused by this line in the script:

$session = New-RDMSession -Name $app.name -Group ("Customers\" + $app.customer) -TemplateID "8f04f52a-b976-44c8-b819-3996b1d6f2f5" -Type "TemplateGroup" -SetSession;

I take it that if someone made an update to the template the guid changes?

What is the command I can run to get templates and list their name to IDs?

There used to be a good docs section that listed all the available commands, but I cannot find it anymore, there seems to be a new page which lacks much info https://help.remotedesktopmanager.com/powershell_cmdlets.html

I have already gone to File->templates but cannot open edit on the one I believe it's supposed to use, that is grayed out

Set-RDMSession : Connection has invalid group specified (13.6.2.0)

avatar
avatar
avatar
avatar
avatar

Thanks,

A piece to note is this script had worked in the past and was last successfully run without any changes about 2 months ago, so it's likely related to an update that was installed.

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

avatar
avatar
avatar
avatar
avatar

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

Set-RDMSession : Connection has invalid group specified (13.6.2.0)

avatar
avatar
avatar
avatar
avatar

I am not able to create new sessions from templates.

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

Update-RDMUI;

Set-RDMSession $session;

Throws: Set-RDMSession : Connection has invalid group specified

Yes the folder for ("Customers\" +$app.customer") exists, I am trying to make new sessions within that folder.

I've seen the thread dealing with this from here https://forum.devolutions.net/topic29416-setrdmsession-throw-connection-has-invalid-group-specified-.aspx

But nothing said there is working for me. As you can see I am using the Update-RDMUI command.

I also do not see the Allow virtual folders option in the Data Source Settings pane.

Is there a different workaround?

What dll files to import to run commands from external file?

avatar
avatar
avatar

figured it out, add:

Import-Module "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.dll

What modules to import to run powershell commands in external script?

avatar
avatar
avatar
avatar
avatar

figured it out, add:

Import-Module "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.dll

source: https://blog.devolutions.net/2016/09/new-remote-desktop-manager-powershell-module.html

What dll files to import to run commands from external file?

avatar
avatar
avatar

I have a ps1 file that executes the Get/Set commands for data source and sessions and I need to be able to run it outside of the powershell embedded within RDM.

I know about the Import-Module command I can use, but which dll files should I import? There are dozens in the directory "C:\Program Files (x86)\Devolutions\Remote Desktop Manager"

What modules to import to run powershell commands in external script?

avatar
avatar
avatar
avatar
avatar

David,

That's exactly my question. In the rdm folder there are dozens of dll files, which ones do I need to import to run the 4 commands listed?

What modules to import to run powershell commands in external script?

avatar
avatar
avatar
avatar
avatar

Hello,

I have a .ps1 file that has commands I need to run, which works perfectly fine when called via the embedded powershell. However, I have a need to run this script every hour and was thinking of doing so with a scheduled task, but the script fails to execute the RDM specific commands which I assume is because it is outside of the powershell embedded into the RDM UI.

So my question is: Which modules do I need to import or is there support in RDM itself to run such a script on a schedule?

I am using version 12.0.8.0

The commands I need to be able to run are:

  • Get-RDMDataSource

  • Set-RDMCurrentDataSource

  • Get-RDMSession

  • Set-RDMSession

Thanks for the help!

Move a Server group and all children to another folder

avatar
avatar
avatar
avatar

Awesome, putting the path in the name instead of using the -Group flag worked!

Thanks!

Move a Server group and all children to another folder

avatar
avatar
avatar
avatar

As a current work around I've done the following:

1) create the new session from template

2) set the $session[0] (the parent)

3) update the $session[0].Group to desired path

4) Set $session[0]

5) set all the child element groups as so: $session[1].Group to desired path including name of the parent

6) Set-RDMSession $session -Refresh

7) create a new session with equivalent name and group to what parent should be

8) $session.GroupDetails.GroupType="Server" (to make it a server)

9) set the custom fields on said server that are needed (they get lost when session is recreated without a template)

10) Set-RDMSession $session -Refresh

And I get the desired outcome. This is of course ridiculous to have to do as it's recreating what I understand is exactly what a template is meant to do, but at least it's functional for now.

My desire would be this:

1) create the new session from template and set

2) some command to move the whole session to another folder group

Move a Server group and all children to another folder

avatar
avatar
avatar
avatar

Yeah I execute those as 2 lines, copy paste error in my post sorry, will fix.

If it makes a difference I'm still running 11.6.2.0, but we should be upgrading to 12 very soon. Not sure if that makes a difference with this or not.

Move a Server group and all children to another folder

avatar
avatar
avatar
avatar

Hi

As the title says I'd like to move a server and its connections into a different folder. Is there a powershell command to do this easily?

The issue I have is that I create a server using a template as so:

$session = New-RDMSession -Name "TestCustomer1" -Group "Customers\Test1" -TemplateID "99d11076-8e4e-468c-ae14-badc08affb54" -Kind "TemplateGroup" Set-RDMSession $session -Refresh;

But it seems to ignore the -Group flag and places it at the root in the navigation hierarchy, just below the main server node. The template places things as expected if I right click on the Customers folder and choose Add-> Add From Template, but not when done via powershell.

So, is there a second command I can run after creating my server session?

Thanks!

Update: After creating, clickiong and dragging the new server into the folder does exactly what I want, however I will be making a great deal of these and it would be awesome if there was just a command I could run after each creation. So, basically I want to mimmic the click and drag method via powershell

Web service / REST api

avatar
avatar
avatar
avatar
avatar

Hi

Is there a rest service that would be running on the RDM server? I'm looking for a simple and stable way to get the guid of templates we have defined, possibly as a json array via a rest call.

Does anything like this exist or is the only current way to get that list to check the database or running Get-RDMTemplate?

Thanks!

Powershell & -kind "Customer" icon

avatar
avatar
avatar
avatar
avatar

Awesome that worked, thanks! I was trying to set the Type in New-RDMSession to Customer instead of Group.

Another question though, for me the parameter -Type doesn't work, I need to use -Kind instead. Is this because I'm on a different version or something?

I'm currently running on Version 11.6.2.0

Powershell & -kind "Customer" icon

avatar
avatar
avatar
avatar
avatar

Hello,

I'm having the same issue with the icon and also when I right click on it and go properties I see the generic properties popup (Incorrect.jpg below), not the Group/Folder one I see for entries I've created manually in the GUI (Correct.jpg below). I don't see any errors when I run "$session.GroupDetails.GroupType = "Customer";" but it doesn't seem to do anything.

How can I make the session I created appear and function like the other Customer Group/Folders??

1 - 17 of 17 items