If your infrastructure varies wildly, and the only common thread is having a tentacle installed, then you would likely need set up Octopus to run your command on each target, and then consolidate the information out of the task log (since it will be broken up per-machine) with Select-String or grep, depending on your infrastructure.
Thank you for your response. The servers are not in the domain, so I can not use a list of servers in my script because I’ll get an Access Denied error.
Using Octopus, is there a way to consolidate the information from all the servers? Can you send me an example using the Select-String, please?
Owing to the inability to use a remote powershell session, you would likely need to use the latter option suggested, of scraping the task log for information. Sadly, I don’t have a script for this, but here’s a great resource on using Select-String in PowerShell to pull out the information you need: https://blog.ipswitch.com/select-string-the-grep-of-powershell