title: Azure DevOps task inline script with powershell does not fails the task on error
body: <p>In the Azure DevOps <strong>release pipeline</strong> I run <strong>Inline Script</strong> as part of the Post Deployment Action of <strong>Azure App Service Deploy task</strong> (Task version 4.*).</p>
  <p>The inline script looks like this:</p>
  <pre><code>powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File UpdateCSP.ps1 -ApiUrl &quot;$(API_URL) $(API_TESTING_URL)&quot;
  powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File GenerateVarsJs.ps1 -ApiUrl &quot;$(API_URL)&quot; -IdamAuthServerUrl &quot;$(AUTH_SERVER)&quot; -IdamClientId &quot;$(CLIENT_ID)&quot; -TestApiUrl &quot;$(API_TESTING_URL)&quot;
  </code></pre>
  <p>One of the scripts was hard terminated (by invoking <code>Throw &quot;some error text&quot;</code>) command. The error was written into the task output but the task itself succeeded.</p>
  <p>Hard terminated powershell script returns error code 1. Therefore my expectation was that script failure would also fail the task.</p>
  <p>I would need the task to fail in case of script failure (nobody is checking the output of succeeded task). How this could be done?</p>