Firstly, let me welcome you to the Octopus community, it is great to see you here
Can I ask what information you are trying to collate from Octopus here? Just to help me fully understand, it would be good to know in a little more detail your end goal here to see if we can help with a Solution.
Out of curiosity, where are you running your scripts within Octopus, are you using Runbooks, Deployment Process or the Script console? I am assuming the Script Console as you mentioned console script, but wanted to double check.
In this case I’m running an sql query against a local db to collect the last ticket number from a lot of machines and would like to collate them all into a single spreadsheet. Don’t want to burn out my gaming finger copying and pasting
Rights within Octopus are siloed in my org and there is no chance I’ll get access to do more than run console scripts. Can I still do this with only console scripts?
I just wanted to make sure that we are on the same page when you are referencing “Console Scripts” you are referring to the “Script Console” within Octopus?
If I am being upfront, using the Script Console for your task, you may find your limitations (which I think you may have already) trying to achieve this. The Script Console is effectively a session run on each of your workers, targets or your Octopus server, similar as if you are running a PowerShell session. Depending on what you have selected, the Script Console will create a session on each machine, so there is not a simple way to do this using the Script Console.
If you needed to do this within Octopus using the Script Console, the only way I can currently think to do this is get Octopus to store the results into a CSV on each target and use another process (outside Octopus if you are limited to only use the Script Console) to collect the files and run another script/process to consolidate this.
I appreciate that you may be limited with your Octopus access, but I feel that a Runbook may be a better alternative here as you could take better advantage of using output variables and using a process to help automate this.