Scripting in Octopus

As part of our deployments we must have run a number of Powershell scripts. Couple questions about those:

Which credentials the scripts are running under? Can we change that? Can we set different credentials depending on which environment we deploy to?

Is it possible to make Octopus run Powershell script on deployment target computer? (Using tentacle or not)

Konstantin

Hi Konstantine,

Thank you for reaching out! Let me give you a hand with those queries.

Which credentials the scripts are running under? Can we change that?
Running scripts from the Tentacle will be executed via the user that was set for that specific Tentacle Service. That can be checked and changed in your Tentacle Service, under Services -> Octopus Tentacle -> Properties -> Log On.

Can we set different credentials depending on which environment we deploy to?
Unfortunately not. Each Tentacle instance runs under its own windows service, and all the processes are executed by the account configured in that service. There’s no way to set that globally per environment.

Is it possible to make Octopus run Powershell script on deployment target computer?
Yeah, definitely. This documentation will show you how (including additional information about changing the User configuration):

Please let me know if you have any further questions!

Kind regards,

Kenny