Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done Allow PowerShell 5.1 to catch PShell helper command exceptions

Aug
2,799
144
The following helper function/alias for PShell do not throw an execption on an error.
  • Invoke-TccCommand / tcc
  • Expand-TccValue / tccx
  • Get-TccVariable / tccvar
I can create PowerShell 5.1 wrapper functions for each of these to throw an exception on an error,
but it seems more logical to have the helper function/alias throw the exception on an error from TCC (TC-PowerShellHost64.dll),
so that the exception can be caught from PowerShell 5.1

Joe
 
Back
Top