I’m trying to run a PostDeploy.ps1 powershell script, but I seem unable to run any. Even the most simple scripts fail with:
Working dir: c:\Octopus\Applications\Test\My.Database\188.8.131.52810_4
ERROR: Missing expression after unary operator ‘-’.
ERROR: At line:1 char:2
ERROR: + -E <<<< xecutionPolicy Unrestricted -File c:\Octopus\Applications\Test
PowerShell exit code: 0
If I run the script manually, they succeed. So it seems to be something wrong with the server configuration.