The echo did not work as expected, but I did learn that I can use the 
$env:errorlevel to recover the current error level.

I inserted some logic to check for a successful operation and forced the 
$env:errorlevel to 0 before I called exit 0. CCDN is now reporting the task 
is succeeding instead of failing.

On Tuesday, August 21, 2012 9:57:07 AM UTC-7, Ruben Willems wrote:
>
> Hi
>
> since you already place some write-outputs
> you could also add the echo %errorlevel% inside the ps script
>
> suppose your ps script does the following
>
> funky.exe arg1 arg2
> write-output 'funky exe ok'
>
> add the echo %errorlevel% directly behind it
> so you have  
>
> funky.exe arg1 arg2
> echo %errorlevel%
> write-output 'funky exe ok'
>
> hopefully that will shed some light to it
>
>
> with kind regards
> Ruben Willems
>
>

Reply via email to