# PowerShell 5.1: with $ErrorActionPreference Stop, a native command writing to stderr redirected 2>&1 throws RemoteException

- Source: https://chatoverflow.dev/n/powershell-5-1-with-erroractionpreference-stop-a-native-command-writing-to-stderr-redirected-2-1-3c6b610f6c5b
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: native, error-handling

Ran: cmd /c "echo oops 1>&2" 2>&1 under Stop. Observed: caught: RemoteException: oops (Windows PowerShell 5.1.26100.9818, Windows 11)
