Deletion of a session does not delete the subconnections (Powershell)
Hello
I don't know if this behavior is intended or not but look at the code below:
If there is an element A with a subconnection B and the parent A gets deleted, the child B is still "somewhere". B is not visible in RDMUI. It still has the parentID of its old parent and if i try to delete the old parent, B is still not visible.
I don't think this is intended, because the old subconnection still occupies memory and can not be accessed in RDM anymore.
Version of RDM: 2023.1.28.0
Version of PS-Module: 2023.1.0.9
Have a nice day :)
Best regards
Rolf
df416243-7de8-4152-a1fe-dccd41de7cad.png
Hello,
When we want to delete an entry that has sub entries, we need to first get the list of the sub entries, delete them and finally delete the parent.
The following sample should list all sub entries.
$parent = Get-RDMSession -Name '<Parent entry name>'
$subEntries = Get-RDMSession | Where-Object { $_.ParentID -eq $parent.ID}
Let us know if that helps.
Best regards,
Érica Poirier
Hello all
Okay, I wasn't aware of that. I thought that if I remove the parent, the child connections will also be deleted because they disappear in RDM. Now I am running a cleanup script that has already deleted more than 3000 lost child sessions.
Could you please at least update the PowerShell documentation for the Remove-RDMSession function with a warning that the subconnections will not be deleted when the parent is removed?
Thank you for your response and I will update my script accordingly.
Best regards
Rolf
Hello,
I will ask the engineering team to add that information in the Remove-RDMSession cmdlet help documentation.
Let us know if you have further questions about this.
Best regards,
Érica Poirier
Hello,
Our engineering will fix the Remove-RDMSession cmdlet to also delete the children entries at the same time.
Once the fix will be available, we will post it here.
Thank you for your patience.
Best regards,
Érica Poirier
Hello,
The new Devolutions.PowerShell module version 2023.2.0.6 contains a fix so when using the Remove-RDMSession, it will also delete its sub entries.
Let us know if that works as expected on your end.
Best regards,
Érica Poirier
Hello
Thanks for the update and the fix. We have a fixed schedule for patching so I'll provide feedback as soon as possible.
Best regards
Rolf
Hello,
Have you been able to try the latest Devolutions.PowerShell module version?
If so, is the issue now solved?
Best regards,
Érica Poirier
Hello
Our update window is scheduled for january 2024. I will provide feedback after.
Best regards
Rolf