diff --git a/src/System.Management.Automation/engine/NativeCommandProcessor.cs b/src/System.Management.Automation/engine/NativeCommandProcessor.cs index 3bb0fef21b9..2168365c747 100644 --- a/src/System.Management.Automation/engine/NativeCommandProcessor.cs +++ b/src/System.Management.Automation/engine/NativeCommandProcessor.cs @@ -435,8 +435,8 @@ internal override void ProcessRecord() { // If upstream is a native command it'll be writing directly to our stdin stream // so we can skip reading here. - if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSNativeCommandPreserveBytePipe) - && !UpstreamIsNativeCommand) + if (!ExperimentalFeature.IsEnabled(ExperimentalFeature.PSNativeCommandPreserveBytePipe) + || !UpstreamIsNativeCommand) { while (Read()) {