Get Error Information

I am running a powershell script on an on-prem Octopus Tentacle to deploy a “JAMS” job. I am not getting very good error information back. Where can I go, or what can I do to get better information on my error?


Hi Matt,

Welcome to the Octopus boards!

What kind of powershell script are you running? What is the error you’re receiving in the task log if you look at RAW?


This is what I’m trying to run:
Write-Host “Attempt to post job to JAMS Server…”

Import-JAMSXml -path $FolderPathAndJob;

Write-Host “Successfully posted to JAMS Server”

(from : )

This is my error section:

Attempt to post job to JAMS Server…
11:59:08 Error | C:\Octopus\Work\20201007165904-78264-147\Script.ps1 : Default Error Handler
11:59:08 Error | At C:\Octopus\Work\20201007165904-78264-147\Bootstrap.Script.ps1:843 char:1
11:59:08 Error | + . ‘C:\Octopus\Work\20201007165904-78264-147\Script.ps1’
11:59:08 Error | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11:59:08 Error | + CategoryInfo : NotSpecified: (:slight_smile: [Write-Error], WriteErrorException
11:59:08 Error | + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Script.ps1
11:59:08 Verbose | Updating manifest with output variables
11:59:08 Verbose | Updating manifest with action evaluated variables
11:59:08 Fatal | The remote script failed with exit code 1
11:59:08 Verbose | at Octopus.Worker.Scripting.ScriptResult.EnsureSuccessful()
| at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.<>c__DisplayClass29_0.b__0()
| at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.ExecuteWithTransientErrorDetection(Action action, Machine machine)
| at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.ExecuteActionAndInitLoggingContext(PlannedStep step, Machine machine, PlannedAction action)

Hey Matt,

Thanks for the information.

In this case I think the best bet to get more detail on why Import-JAMSXml is failing is to remote into the server/tentacle running this command as the service account thats running the tentacle/server service, then run the command manually and see what the output is.

Please let me know how it goes.


I will give it a try, thanks!

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