How can I add a new XML DataSource from PowerShell?

How can I add a new XML DataSource from PowerShell?

avatar

I am trying to import an XML datasource using powershell. From reading the docs (https://help.remotedesktopmanager.com/index.html?new-rdmdatasource.htm), it seems like I should be able to do:

C:\> Import-Module -Name "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"
C:\> $s = New-RDMDataSource -XML -FileName c:\path\to\test1.xml -Name test1
C:\> Set-RDMDataSource -DataSource $s


This doesn't have an output or indicate any errors, but it also doesn't work.

It looks like the output from New-RDMDataSource is ok:

C:\> $s

ID Name Type
-- ---- ----
0e773a8c-0483-4a61-a797-3a226d62dffd test1 Xml


However, after using Set-RDMDataSource (even if I use Update-RDMUI or restart RDM), this new entry doesn't show up in the UI or the output of Get-RDMDataSource.

I also tried this with the -SetDatasource, with no success.

How do I add a new XML datasource from powershell? (Or just automate it, somehow)

All Comments (4)

avatar

Hello,

I tried to do the same as you to no avail. I verified with the engineering if we're not overlooking something, but it seems to be a bug.
We'll come up with the reason behind, and a potential fix (I'll let you know).
In the meantime, and I understand that it's not automated, but maybe you could manage by exporting / importing the data source?
as described here: https://help.remotedesktopmanager.com/datasource_importexport.htm)

Sorry I can't be of more help for now, but i'll keep you in touch.

Best regards,

Alex Belisle

avatar

Hello,

Just a quick update, the issues is being fixed by the engineering dept (ticket RDMW-2090).
It should be fixed in the next build.

Sorry for the inconvenience.

Best regards,

Alex Belisle

avatar

Great to hear! Thanks.

avatar

Hello,

A frinedly notification to let you know that RDM 2019.1.3 (Beta) is now out and contains the fix for this issue. You can find it here : https://remotedesktopmanager.com/home/download#Beta

Best regards,

Alex Belisle