Issue with PS. Current solution would require adding last error code check to every external process start. Instead, waiting on feature new to have this behavior be automatic in 7.3.0 https://github.com/PowerShell/PowerShell-RFC/pull/277 https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-73?view=powershell-7.2