Using v4.0.6 and trying to run a powershell script in the install tasks

I can’t see any reason why this’d be occurring, but you’ve not provided any logs or much other context, etc. The reason the logger prints stack traces and other good stuff is so we can see more about your world. The error message on its own doesn’t mean a lot.

Lastly, why run a new PowerShell script in a new PowerShell process like this? You’d be better off using the call operator (&) to invoke the script, then you can try/catch it like any other function, etc. Better yet, rewriting it into something directly within Invoke-AppDeployToolkit.ps1 would yield the best result.