Start a new topic

Royal CLI import/merge function?

im trying to keep a royal document up to date with the correct server information for an infrastructure of 5000+ servers. I have been creating CSVs (1 for RDP 1 for terminal since I dont seem to be able to import both at the same time without royal setting RDP sessions as terminal and vice versa) to import into royal to keep the host information up to date.
Im looking to automate this a little more and was wondering if there was a way to turn those 2 CSVs into 1 document that can be opened, instead of importing 2 CSVs. My current idea is to import the new CSVs and merge the old and new documents. I would like to script this to remove human interaction.
Any other ideas are welcomed. 

Thanks.


Hi James,


I don't know your exact requirements but it sounds a bit complicated. Depending on where you get the source data (Active Directory, a CMDB, etc.) you might be better off to check out the dynamic folder feature we introduced. The idea is that you have a script (like PowerShell) which pulls data from a data source (like Active Directory) and build the folder structure accordingly.


Here are some resources:

https://www.royalapps.com/go/dynamicfolder-samples

https://www.royalapps.com/go/rjson-documentation

Here's a video one of our users released which does a great job explaining how to pull in data from Active Directory:

https://www.youtube.com/watch?v=pKurlGhMfoQ


Regards,
Stefan



1 person likes this

Thanks for your help. 

You're welcome!

Thanks for this. I really like the idea of this option and will pursue this in the future. At this time there is a mix of royal versions and not everyone has access to the dynamic folder option. 
Im looking for more options similar to this https://content.royalapplications.com/Help/RoyalTS/V4/index.html?scripting_gettingstarted.htm but hopefully something that I can use to create a document, import 2 different CSVs and finally merge the current document with a previous document. 
If not I can do the few manual steps, I was just looking to see if full automation is possible.

Thanks ahead of time.

You can, of course, use our PowerShell API (most recent docs are here: https://content.royalapplications.com/Help/RoyalTS/V5/index.html?scripting_gettingstarted.htm) to create and update your document. However, merging the content of multiple CSV into your document can only be done properly by your script. I'm afraid the logic, conflict resolution strategy, etc. must be implemented in your PowerShell script.


Regards,
Stefan

Login or Signup to post a comment