If a terminating error occurs in a PowerShell script used in a post-installation action the Dell KACE K2000 task engine will not spot it and will report that the task executed successfully despite the error.

This is normal due to the fact that when such errors happen in the PowerShell engine the return code to the Windows command line (ERRORLEVEL) is always 0.

If you want to know how to circumvent the issue you can have a look to my article on ITNinja.com http://www.itninja.com/blog/view/a-powershell-terminating-error-in-a-post-installation-action-will-not-make-the-k2000-task-engine-to-halt