Prompted variable to choose a target computer for Powershell?

Is it possible, to configure a project to use a prompted variable to indicate which target computer to run Powershell on?
What I want to do, is allow a user to pick which machine to run a Restart-WebAppPool on (to recycle an IIS app pool).
I’d have the script run on the Octopus server, and configure the target with the prompted variable, however, it would be cleaner if I could have the script run on the selected server, than having the additional code needed to run it remotely.


Hi Jim,

Thanks for getting in touch! Unfortunately I don’t think there’s a super straightforward way to approach this, since there’s no way to bind variables to target roles or evaluate variable run conditions per machine. However a few options come to mind that could potentially help are:

Would any of those options suit? Let me know what you think or if you have any further questions going forward. :slight_smile:

Best regards,


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.