diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Redirection.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Redirection.md index 38894e7649d8..e5dfa82f1425 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Redirection.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Redirection.md @@ -1,7 +1,7 @@ --- description: Explains how to redirect output from PowerShell to text files. Locale: en-US -ms.date: 09/29/2023 +ms.date: 11/29/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Redirection @@ -26,9 +26,14 @@ You can use the following methods to redirect output: - Use the `Tee-Object` cmdlet, which sends command output to a text file and then sends it to the pipeline. -- Use the PowerShell redirection operators. Using the redirection operator with - a file target is functionally equivalent to piping to `Out-File` with no - extra parameters. +- Use the PowerShell redirection operators. Redirecting the output of a + PowerShell command (cmdlet, function, script) using the redirection operator + (`>`) is functionally equivalent to piping to `Out-File` with no extra + parameters. + + PowerShell 7.4 changed the behavior of the redirection operators when used to + redirect the **stdout** stream of a native command. For more information, see + [Example #7](#example-7-redirecting-binary-data-from-a-native-command). For more information about streams, see [about_Output_Streams][04]. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Out-File.md b/reference/7.4/Microsoft.PowerShell.Utility/Out-File.md index 2111fb968d1c..24627d523fb7 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Out-File.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Out-File.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 07/27/2023 +ms.date: 11/29/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/out-file?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Out-File @@ -34,9 +34,12 @@ Out-File [[-Encoding] ] -LiteralPath [-Append] [-Force] [-NoC The `Out-File` cmdlet sends output to a file. It implicitly uses PowerShell's formatting system to write to the file. The file receives the same display representation as the terminal. This means that the output may not be ideal for programmatic processing unless all input objects are strings. -When you need to specify parameters for the output, use `Out-File` rather than the redirection -operator (`>`). For more information about redirection, see -[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md). + +When you use the redirection operator (`>`) to redirect output to a file, internally, PowerShell +adds `Out-File` to the end of the pipeline. If you need to change how PowerShell writes to the file, +use `Out-File` with parameters rather than the redirection operator (`>`). PowerShell 7.4 also +changed the behavior when redirecting from a native command. For more information about redirection, +see [about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md). ## EXAMPLES diff --git a/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-74.md b/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-74.md index 970f17ba88d2..2e9f06ac3f5a 100644 --- a/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-74.md +++ b/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-74.md @@ -1,7 +1,7 @@ --- title: What's New in PowerShell 7.4 description: New features and changes released in PowerShell 7.4 -ms.date: 11/16/2023 +ms.date: 11/29/2023 --- # What's New in PowerShell 7.4 @@ -21,6 +21,13 @@ For a complete list of changes, see the [CHANGELOG][15] in the GitHub repository - `Test-Json` now uses Json.Schema.Net instead of Newtonsoft.Json.Schema. With this change, `Test-Json` no longer supports the older Draft 4 schemas. ([#18141][18141]) (Thanks @gregsdennis!) - Output from `Test-Connection` now includes more detailed information about TCP connection tests +- .NET introduced changes that affected `Test-Connection`. The cmdlet now returns 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 + 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** + parameter ([#19755][19755]) (Thanks @MartinGC94!) ## Installer updates @@ -325,3 +332,4 @@ For more information about the Experimental Features, see [Using Experimental Fe [20369]: https://github.com/PowerShell/PowerShell/pull/20369 [20371]: https://github.com/PowerShell/PowerShell/pull/20371 [17955]: https://github.com/PowerShell/PowerShell/pull/17955 +[19755]: https://github.com/PowerShell/PowerShell/pull/19755