Title is pretty self-explanatory. If you create a script step that does something like this:
New-Item C:\Foo\Bar;
… and then run the deployment, the step will hang forever until a time-out occurs (which takes 5 minutes), upon which Octopus will kill the step and say ‘The remote script failed with exit code -1’ and ‘The operation was canceled.’.
The reason for this is of course that when you execute the above script, which is missing a required parameter, PowerShell will helpfully ask you to supplement parameters to New-Item with an interactive prompt.