Forum / Remote Desktop Manager - PowerShell Repository

Powershell Session Import

  • Create an Issue
  • Cancel

Hy,

i'm just updating our session import script, as it was written while using the powershell CMD-lets a few years ago and now we are going to a newer version and want to use the powershell module...

Before i could just set the group of a session with $session.Group = "abc\abc2\abc3" and confirm it with Set-RDMSession $session. Looks like that's not working anymore, so i tried it with $session = New-RDMSession -Type "Group" -Name "abc\abc2\abc3". But it looks like that i need to add a new group (and confirm it with Set-RDMsession) for every subfolder, before i can go to the next one? Is that right? Is there no way to add a session straight into a new folder structure with for example 3 sub directories?

And how can i add a subsession for a client? Before it was with $session.children. I can't find a new possibilty for this, as $session.subconnections is a read-only property.

Thanks for your help,
Best regards

Clock2 yrs

Hello,

About the new folder structure, depending on the data source type you are connected to, the possibility to create Virtual Folders has been disabled. Then, you need to create the whole folder structure before creating any entry in the lowest folder level.

About subconnections, you need to first create the entry and then use the Invoke-RDMParentSession to add that session as a child to a parent session.

Finally, I have move this thread under the PowerShell forum section.

Best regards,



Érica Poirier

signaturesignature

Clock2 yrs

Hello Erica,

Script is working fine now, except one "beauty" problem... I set the current Datasource at the beginning with "Set-RDMCurrentDataSource -ID <ID>".
If i don't do that, the script is running slow and will exit at some point, with it everything is fine but i get the following console output every time (cannot be surpressed with | out-null, etc.)


Devolutions.RemoteDesktopManager.Business.Exceptions.RootException: Duplicate root creation detected!
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.DetectDuplicateRoots(Connection root, IDbTransaction dbTransaction, String repositoryId, Boolean update)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.c0cc7f9d508f1ec50318abae3c37f1fc0(Connection cbdc2310dae04de179a24c6e62a14e6e8, IDbTransaction c5a0ca8eaa594113c2f0b3cfe13dedff9, Nullable`1 c6c7922f70bc4ad6a683a9f6baa3f4b7d, Boolean c6d1e4c3cd1ebd972b34fc4a6a144a4e1)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.SaveConnections(IEnumerable`1 connections, IDbTransaction dbTransaction, ISecurityProvider provider, Nullable`1 repositoryID)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.SaveConnection(Connection connection)


Is there anyway to avoid this output?

Thanks in advance.

Clock2 yrs

Hello,

Yes it is possible to fix this issue. I would need more information to investigate this.

1- What RDM version are you using?
2- Are you using the same RDM version on every machine?
3- What data source are you using?
4- If it is Devolutions Password Server, what version are you using?

Best regards,



Érica Poirier

signaturesignature

Clock2 yrs

Hello,

1 - 13.6.5.0
2 - Yes (I'm currently the only one testing the new version, so it's just the my client on a test database)
3 - SQL Server
4 - ------

Best regards,

Clock2 yrs

Hello,

Thank you for the information.

Does your SQL data source is encrypted using a Security Provider?

Could you please run the following SQL statement on your SQL database and send me the results in a private message?

SELECT ID, Data, ConnectionType, Name, RepositoryID
FROM [dbo].[Connections]
WHERE ConnectionType = 92

Best regards,



Érica Poirier

signaturesignature

Clock2 yrs

Hello,

Thank you for the query results you sent me by private message.

I think it would be preferable to investigate your issue in a remote session. Please send us an email at ticket@devolutions.net and we will send you our online calendar to book an appointment at your convenience.

Best regards,



Érica Poirier

signaturesignature

Clock2 yrs