Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Combining commands into pipelines in the PowerShell
Locale: en-US
ms.date: 10/02/2025
ms.date: 12/28/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pipelines?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Pipelines
Expand Down Expand Up @@ -400,17 +400,15 @@ one at a time.
## Using native commands in the pipeline

PowerShell allows you to include native external commands in the pipeline.
However, it's important to note that PowerShell's pipeline is object-oriented
and doesn't support raw byte data.

Piping or redirecting output from a native program that outputs raw byte data
converts the output to .NET strings. This conversion can cause corruption of
the raw data output.
Before PowerShell 7.4, piping or redirecting output from a native program that
outputs raw byte data converted the output to .NET strings. This conversion
caused corruption of the raw data output.

However, PowerShell 7.4 added the `PSNativeCommandPreserveBytePipe`
experimental feature that preserves byte-stream data when redirecting the
**stdout** stream of a native command to a file or when piping byte-stream data
to the **stdin** stream of a native command.
In PowerShell 7.4 or higher, the `PSNativeCommandPreserveBytePipe` experimental
feature is mainstream. This feature preserves byte-stream data when
redirecting the **stdout** stream of a native command to a file or when piping
byte-stream data to the **stdin** stream of a native command.

For example, using the native command `curl` you can download a binary file and
save it to disk using redirection.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Combining commands into pipelines in the PowerShell
Locale: en-US
ms.date: 10/02/2025
ms.date: 12/28/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pipelines?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Pipelines
Expand Down Expand Up @@ -400,17 +400,15 @@ one at a time.
## Using native commands in the pipeline

PowerShell allows you to include native external commands in the pipeline.
However, it's important to note that PowerShell's pipeline is object-oriented
and doesn't support raw byte data.

Piping or redirecting output from a native program that outputs raw byte data
converts the output to .NET strings. This conversion can cause corruption of
the raw data output.
Before PowerShell 7.4, piping or redirecting output from a native program that
outputs raw byte data converted the output to .NET strings. This conversion
caused corruption of the raw data output.

However, PowerShell 7.4 added the `PSNativeCommandPreserveBytePipe`
experimental feature that preserves byte-stream data when redirecting the
**stdout** stream of a native command to a file or when piping byte-stream data
to the **stdin** stream of a native command.
In PowerShell 7.4 or higher, the `PSNativeCommandPreserveBytePipe` experimental
feature is mainstream. This feature preserves byte-stream data when
redirecting the **stdout** stream of a native command to a file or when piping
byte-stream data to the **stdin** stream of a native command.

For example, using the native command `curl` you can download a binary file and
save it to disk using redirection.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Combining commands into pipelines in the PowerShell
Locale: en-US
ms.date: 10/02/2025
ms.date: 12/28/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pipelines?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Pipelines
Expand Down Expand Up @@ -400,17 +400,15 @@ one at a time.
## Using native commands in the pipeline

PowerShell allows you to include native external commands in the pipeline.
However, it's important to note that PowerShell's pipeline is object-oriented
and doesn't support raw byte data.

Piping or redirecting output from a native program that outputs raw byte data
converts the output to .NET strings. This conversion can cause corruption of
the raw data output.
Before PowerShell 7.4, piping or redirecting output from a native program that
outputs raw byte data converted the output to .NET strings. This conversion
caused corruption of the raw data output.

However, PowerShell 7.4 added the `PSNativeCommandPreserveBytePipe`
experimental feature that preserves byte-stream data when redirecting the
**stdout** stream of a native command to a file or when piping byte-stream data
to the **stdin** stream of a native command.
In PowerShell 7.4 or higher, the `PSNativeCommandPreserveBytePipe` experimental
feature is mainstream. This feature preserves byte-stream data when
redirecting the **stdout** stream of a native command to a file or when piping
byte-stream data to the **stdin** stream of a native command.

For example, using the native command `curl` you can download a binary file and
save it to disk using redirection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For a complete list of changes, see the [CHANGELOG][chg] in the GitHub repositor
- Output from `Test-Connection` now includes more detailed information about TCP connection tests
- .NET introduced changes that affected `Test-Connection`. The cmdlet now returns an error about
the need to use `sudo` on Linux platforms when using a custom buffer size ([#20369][20369])
- Experimental feature [PSNativeCommandPreserveBytePipe][10] is now mainstream. PowerShell now
- Experimental feature [PSNativeCommandPreserveBytePipe][11] is now mainstream. PowerShell now
preserves the byte-stream data when redirecting the **stdout** stream of a native command to a
file or when piping byte-stream data to the stdin stream of a native command.
- Change how relative paths in `Resolve-Path` are handled when using the **RelativeBasePath**
Expand Down Expand Up @@ -232,7 +232,7 @@ For more information about the Experimental Features, see [Using Experimental Fe
[08]: /powershell/module/microsoft.powershell.core/about/about_ansi_terminals
[09]: /powershell/module/microsoft.powershell.core/about/about_preference_variables#psnativecommandargumentpassing
[10]: /powershell/module/microsoft.powershell.core/about/about_preference_variables#psnativecommanduseerroractionpreference
[11]: /powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7.4&preserve-view=true#redirecting-output-from-native-commands
[11]: /powershell/module/microsoft.powershell.core/about/about_pipelines#using-native-commands-in-the-pipeline
[12]: /powershell/module/microsoft.powershell.psresourceget
[13]: /powershell/module/psreadline
[14]: https://json-schema.org/understanding-json-schema/reference/schema
Expand Down