Bug in Step Tempate execution?

I am running this script template step, that seems to never evaluate to true, even though it evaluates to true if I run it locally on the server. Is this a bug?

if (!(test-path “iis:\sites\mywebsite”))

Hi Rich,

Thanks for getting in touch! Sometimes you can run scripts on the command line that won’t run via Octopus and this is 99% of the time due to the user/permissions of who you are logged in as.
To really test if a script is going to work via Octopus to your Tentacle you need to use the Script Console

This allows you to test your scripts without having to run deployments.

If you find that you need to change the Tentacle user to run your scripts you can also do this:

Let me know how this goes.

Thank you Vanessa for your response. Using the script console, I was able to determine that the problem was with my script… not with OD. It turns out that my user profile imports the webadministration module, so the commands I was running worked fine when locally on the server. However, since I wasn’t importing this module in my script, the commands I was using returned unexpected results. Using the script console allowed me to re-run my script over and over again quickly, expediting the troublehshooting process. Thanks!