Get content of all listed configuration file path in table(temporary variable) in pattern.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2022 04:04 AM
Hi All,
I working on a pattern, where i have table which contains multiple config file path, say 15. Now i need to see the content of all config file.
Is there any way i can do this.
One option which i can think of is "Transform table" where i can add one more column say "content" and using script can retrieve the value.
But not sure about the script.
Let me know if you have any idea about it.
TIA
Nimmi
- Labels:
-
Discovery
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 02:56 AM
Hey,
ServiceMapping does not yet support looping - e.g. for each operations. Therefore, only one variable at a time could be parsed.
However, what you can do is to execute a custom command instead, which retrieves all of the content of all files. For powershell this would look something like this:
This will get you all the content of all files you specified. Alternatively you can run a powershell command that loops over all paths specified in your temporary variable.
E.g.
powershell.exe Get-Content one.sql,two.sql,three.sql,four.sql,five.sql
Note: This must be run as a local script (so on the target host).
This will get the content of each of these 5 .sql files. You can use the action "Parse command output" to run this command. Just make sure that the variable is a comma separated list of your file paths.
Hope this helps.
Regards
Fabian