Powershell Step template

We have imported the https://library.octopusdeploy.com/step-templates/1be30b21-ba58-4667-bff4-2d0ef9a806af/actiontemplate-windows-scheduled-task-disable step template to disable a scheduled task.

When running this via Octopus we are getting Cannot load COM type \Schedule.Service\ error message? I can run the same script directly on the server without any issues. Is this a permission thing?


Thanks for getting in touch! When Octopus runs scripts on a Tentacle it runs via the Tentacle user and all scripts are also bootstrapped. This means that running something manually will have different behaviour and permissions than when running via Tentacle.
We suggest using our Script Console when testing a script running on Tentacle as it uses the same methods. https://octopus.com/docs/administration/script-console

I suggest looking into the differences between the user Tentacle runs under and the user that you ran the script under as first check. It can also be issues with the profiles of the users as a second thing to check.

Let me know how you go.