Hello there,
We are currently trying to migrate from a monolithic repository (which contains a folder for each client) to a structure that is one repository per client.
For that I would like to export all folders as RDM files, create a new repository and then import the contents back into the new repository.
Here is the code I am trying to use:try { # Create temp file for export $tempExportFile = "C:\Dev\_temp\RDM\" + $clientFolder.Name + ".rdm" # Export data Export-RDMSession -XML -Sessions $clientEntries -IncludeCredentials -IncludeAttachements -IncludeDocumentation -Path $tempExportFile -ErrorAction Stop -ForcePromptAnswer ([System.Windows.Forms.DialogResult]::Yes) Write-LogSimple -Message "Data exported to: $tempExportFile" -Type "INFO" # change repo Set-RDMCurrentRepository -Repository $targetRepo -ErrorAction Stop # import into new repo Import-RDMSession -Path $tempExportFile -ErrorAction Stop -ForcePromptAnswer ([System.Windows.Forms.DialogResult]::Yes) -DuplicateAction "Ignore" | Set-RDMSession Write-LogSimple -Message "success" -Type "ACTION" } catch { Write-LogSimple -Message "error '$($clientFolder.Name)': $($_.Exception.Message)" -Type "ERROR" # delete temp file if (Test-Path $tempExportFile) { Remove-Item -Path $tempExportFile -Force -ErrorAction SilentlyContinue } }
For the Import-RDMSession command I tried using the -SetSession parameter too, with the same result. The entries (i.e. credentials) and folders are present in the new repository, while the attachments are not.
Importing the exported .rdm file using the desktop application will import the attachments successfully.
I tried placing the attachment into the root, on folder level and on a credential. None of them are imported. The export seemingly captures them indicated by the file size (38 MB), which also gets larger the more attachments I place.
I tried this with Devolutions.PowerShell 2025.2.0, 2025.1.5 and 2025.1.4, with no success.
Please advise.
Sincerely,
Kia Armani
Hello Kia,
Thank you for contacting us on this matter!
Our development team have looked at your issue and mentioned that they could reproduce the problem.
An internal ticket has been opened to resolve the issue. I will let you know more as soon as possible.
In the meantime, if you have any other questions, please let us know.
Best regards,
Maxim Robert
Hello Kia,
As of version 2025.2.1 of the Devolutions.PowerShell module, attachments and documentation are now imported. To enable this, please use the -Set parameter during import.
If you need help with anything else, please let us know.
Best regards,
Maxime