1

My company has an extensive puttycm database (200+ entries in about 15 folders)... puttycm is terrible, it's been dead for how long now? crashes constantly in windows 7, generally miserable.

I am looking to change everything over to mRemoteNG, which is pretty awesome, much more recently developed, supports linking to external tools, doesn't seem to have the same issues with crashing, but there is no conversion for the database.

puttycm has a pretty simple database format.

example: http://pastebin.com/HgF89JGm

mRemoteNG is not quite as nice to look at, but also pretty simple...

example: http://pastebin.com/jzri5uCE

powershell seems like the right answer to do the conversion since it can "easily" parse and output xml, and returing the info from the puttycm file is easy enough, however I'm not getting all the info... this gets me close:

[xml]$puttyhosts = Get-Content C:\Users\pig\Desktop\cm-export.xml
$puttyhosts.configuration.root.name
$puttyhosts.configuration.root | % {$_.connection | % {$_.connection_info}} | ft name,host,port,protocol
$puttyhosts.configuration.root | % {$_.container | % {$_.connection | % {$_.connection_info}}} | ft name,host,port,protocol

but it only returns for the level of container that I specify, and I haven't even gotten into putting that into the mRemoteNG format yet...

any wizards want to have a crack at this? you would be very popular on the mRemoteNG forums, a lot of people want to be able to do this...

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
user201817
  • 11
  • 3
  • 1
    I would suggest that you use an XSLT transform to...well...transform one XML format to the other. Instead of doing it iteratively through code. – alroc Jan 17 '14 at 12:42
  • XSLT is definitely the way to go here (although you could use PowerShell to apply your xslt sheets to the XML) – Mathias R. Jessen Apr 18 '17 at 23:37

0 Answers0