Can the Synchronizer for CSV be used by a powershell script?

Can the Synchronizer for CSV be used by a powershell script?

avatar

I'm writing a Powershell script to sync RDM records into a SQL Datasource. I have my initial load code working and need a way to ensure the SQL Datasource stays in sync with changes. Can the Synchronizer for CSV be called by a Powershell script programatically?
Thanks, Stu

All Comments (10)

avatar

Hello,

The synchronizer is an entry that can be "opened" like all others. The Open-RDMSession should do the trick.

An alternative would be to go in the advanced properties of the synchronizer, where you will find the command line to launch that session, it may be easier and you can launch that from your powershell script too.


Best regards,

Maurice

avatar

Thanks. Will try that soon.

avatar

Using Get-RMDSession I found the "Sync" session template and used Open-RDMsession to bind to the template. How do I start the sync session ?

$RDMTemplate = Get-RDMSession | Where-Object{$_.Kind -like "Sync"}
$TemplateSess = Open-RDMSession -ID $RDMTemplate.ID
Thanks, Stu

avatar

Maurice,
I'm trying to get the CSV Synchronizer to work and I'm thinking I need to define the template. But, I cannot find anything that documents the template for RPD entries or any other type?

avatar

Hello,


Whenever a new entry is created, it is completely blank. When you specify a template, we start with that instead. Fields that are specified in the import file will be used to overwrite the corresponding fields of the entry.

Templates can either be local (on the machine) or shared (in the datasource).

http://help.remotedesktopmanager.com/file_templates.htm?zoom_highlightsub=template

So by specifying the template name in the synchronizer, new entries will be based on that template.


Best regards,

Maurice

avatar

I have not been able to get the sync to work at all.
I've created RDP Template, stored it as shared and assigned it to the Synchronizer object. I've opened it manually, via Open-RDMSession and via command line. I don't get any errors or any type of feedback that it executed.

My CSV header line is:
Host,Name,Template,ConnectionType,SubMode,Group,Username,Domain,Password,URL,Expiration,Parent,Port

avatar

I just manually did an import via the RDM Gui with my CSV file and selecting the shared template. Worked beautifully. Synchronizer still does not work. Version is 11.5.1.0
-Stu

avatar

Hello Stuart,

Could you please try version 11.5.4.0? There were some issues with the synchronizer;
http://remotedesktopmanager.com/Home/Download


If there is anything else we can help you with, please let us know.


Best regards,

Mark Beausejour

avatar

Solved my problem and synchronization worked as expected. Added and deleting from the CSV worked against the datasource. Next step is getting the whole process working under the Task Scheduler for unattended usage.

Thanks, Stu

avatar

Moved to new Post \ Thread