diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-Clipboard.md b/reference/5.1/Microsoft.PowerShell.Management/Get-Clipboard.md index a87b70f29ac6..29eae7a9d87a 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-Clipboard.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-Clipboard.md @@ -28,17 +28,15 @@ returned as an array of strings similar to `Get-Content`. ## EXAMPLES -### Example 1: Get the content of the clipboard and display it to the command-line - -In this example we have right-clicked on an image in a browser and chose the **Copy** action. The -following command displays the link, as a URL, of the image that is stored in the clipboard. +### Example 1: Get the content of the clipboard ```powershell +Set-Clipboard -Value 'hello world' Get-Clipboard ``` ```Output -https://en.wikipedia.org/wiki/PowerShell +hello world ``` ### Example 2: Get the content of the clipboard in a specific format diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-Clipboard.md b/reference/7.4/Microsoft.PowerShell.Management/Get-Clipboard.md index 68340f482f86..42dee351ab77 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-Clipboard.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-Clipboard.md @@ -32,16 +32,15 @@ returned as an array of strings similar to `Get-Content`. ## EXAMPLES -### Example 1: Get the content of the clipboard and display it to the command-line - -In this example we have copied the text "hello" into the clipboard. +### Example 1: Get the content of the clipboard ```powershell +Set-Clipboard -Value 'hello world' Get-Clipboard ``` ```Output -hello +hello world ``` ## PARAMETERS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-Clipboard.md b/reference/7.5/Microsoft.PowerShell.Management/Get-Clipboard.md index f7ffb6eeabeb..7c018242f775 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-Clipboard.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-Clipboard.md @@ -32,16 +32,15 @@ returned as an array of strings similar to `Get-Content`. ## EXAMPLES -### Example 1: Get the content of the clipboard and display it to the command-line - -In this example we have copied the text "hello" into the clipboard. +### Example 1: Get the content of the clipboard ```powershell +Set-Clipboard -Value 'hello world' Get-Clipboard ``` ```Output -hello +hello world ``` ## PARAMETERS diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-Clipboard.md b/reference/7.6/Microsoft.PowerShell.Management/Get-Clipboard.md index 850409ff2f42..30d998c251ae 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-Clipboard.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-Clipboard.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 11/01/2025 +ms.date: 12/10/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-clipboard?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -18,7 +18,7 @@ Gets the contents of the clipboard. ## SYNTAX ``` -Get-Clipboard [-Raw] [] +Get-Clipboard [-Raw] [-Delimiter ] [] ``` ## DESCRIPTION @@ -32,20 +32,65 @@ returned as an array of strings similar to `Get-Content`. ## EXAMPLES -### Example 1: Get the content of the clipboard and display it to the command-line - -In this example we have copied the text "hello" into the clipboard. +### Example 1: Get the content of the clipboard ```powershell +Set-Clipboard -Value 'hello world' Get-Clipboard ``` ```Output -hello +hello world +``` + +### Example 2: Get the content of the clipboard using a custom delimiter + +This example gets the content of the clipboard. The content is a string containing the pipe +character. `Get-Clipboard` splits the content at each occurrence of the specified delimiter. + +```powershell +Set-Clipboard -Value 'line1|line2|line3' +Get-Clipboard -Delimiter '|' +``` + +```Output +line1 +line2 +line3 +``` + +### Example 3: Get the content of the clipboard using custom delimiters + +This example gets the content of the clipboard delimited by the line ending for both Windows and +Linux. + +```powershell +Get-Clipboard -Delimiter "`r`n", "`n" ``` ## PARAMETERS +### -Delimiter + +Specifies one or more delimiters to use when the clipboard content is returned as an array of +strings. The command splits the contents of the clipboard at each occurrence of any of the specified +delimiters. If not specified, the default delimiter is `[Environment.NewLine]`. + +- On Windows, the default delimiter is ``"`r`n"``. +- On Linux and macOS, the default delimiter is ``"`n"``. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Platform specific newline +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Raw Gets the entire contents of the clipboard. Multiline text is returned as a single multiline string diff --git a/reference/7.6/Microsoft.PowerShell.Management/Join-Path.md b/reference/7.6/Microsoft.PowerShell.Management/Join-Path.md index 581d48c8ce09..d487bf827bb3 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Join-Path.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Join-Path.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 03/25/2025 +ms.date: 12/10/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/join-path?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: Join-Path @@ -16,7 +16,7 @@ Combines a path and a child path into a single path. ``` Join-Path [-Path] [-ChildPath] [[-AdditionalChildPath] ] [-Resolve] - [-Credential ] [] + [-Credential ] [-Extension ] [] ``` ## DESCRIPTION @@ -150,6 +150,46 @@ Join-Path -Path a -ChildPath b, c, d, e, f, g a\b\c\d\e\f\g ``` +### Example 9: Add extension to file without extension + +```powershell +Join-Path C:\Temp myfile -Extension txt +``` + +```Output +C:\Temp\myfile.txt +``` + +### Example 10: Change existing extension + +```powershell +Join-Path C:\Temp myfile.txt -Extension .log +``` + +```Output +C:\Temp\myfile.log +``` + +### Example 11: Extension without leading dot + +```powershell +Join-Path C:\Temp file.txt -Extension log +``` + +```Output +C:\Temp\file.log +``` + +### Example 12: Remove extension with empty string + +```powershell +Join-Path C:\Temp file.txt -Extension "" +``` + +```Output +C:\Temp\file +``` + ## PARAMETERS ### -AdditionalChildPath @@ -211,6 +251,28 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Extension + +Specifies the extension to use for the resulting path. If not specified, the original extension is +preserved. The leading dot in the extension is optional. If omitted, the command adds it +automatically. + +- If the path has an existing extension, it's replaced with the specified extension. +- If the path has no extension, the specified extension is added. +- If you provide an empty string, the existing extension is removed. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: True +``` + ### -Path Specifies the main path (or paths) to which the child-path is appended. The value of **Path** diff --git a/reference/docs-conceptual/install/install-alpine.md b/reference/docs-conceptual/install/install-alpine.md index 52c008753aea..8dc647ff8c77 100644 --- a/reference/docs-conceptual/install/install-alpine.md +++ b/reference/docs-conceptual/install/install-alpine.md @@ -1,6 +1,6 @@ --- description: How to install PowerShell on Alpine Linux -ms.date: 11/19/2025 +ms.date: 12/15/2025 title: Install PowerShell on Alpine Linux --- # Install PowerShell on Alpine Linux @@ -21,9 +21,9 @@ with a previous version, reinstall the previous version using the [binary archiv Installation on Alpine is based on downloading tar.gz package from the [releases][03] page. The URL to the package depends on the version of PowerShell you want to install. -- PowerShell 7.4 - `https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-linux-musl-x64.tar.gz` +- PowerShell 7.4 (LTS) - `https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-linux-musl-x64.tar.gz` - PowerShell 7.5 - `https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-linux-musl-x64.tar.gz` -- PowerShell 7.6-preview - `https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.5/powershell-7.6.0-preview.5-linux-musl-x64.tar.gz` +- PowerShell 7.6-preview - `https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/powershell-7.6.0-preview.6-linux-musl-x64.tar.gz` Then, in the terminal, execute the following shell commands to install PowerShell 7.4: diff --git a/reference/docs-conceptual/install/install-debian.md b/reference/docs-conceptual/install/install-debian.md index d431562b7ea6..6e19d7d47dee 100644 --- a/reference/docs-conceptual/install/install-debian.md +++ b/reference/docs-conceptual/install/install-debian.md @@ -1,6 +1,6 @@ --- description: How to install PowerShell on Debian Linux -ms.date: 11/19/2025 +ms.date: 12/15/2025 title: Install PowerShell on Debian --- # Install PowerShell on Debian @@ -75,7 +75,7 @@ The link to the current version is: - PowerShell 7.5 universal package for supported versions of Debian - `https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell_7.5.4-1.deb_amd64.deb` - PowerShell 7.6-preview universal package for supported versions of Debian - - `https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.5/powershell-preview_7.6.0-preview.5-1.deb_amd64.deb` + - `https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/powershell-preview_7.6.0-preview.6-1.deb_amd64.deb` The following shell script downloads and installs the current release of PowerShell. You can change the URL to download the version of PowerShell that you want to install. diff --git a/reference/docs-conceptual/install/install-powershell-on-macos.md b/reference/docs-conceptual/install/install-powershell-on-macos.md index f1cf422b42d6..7442a7933f49 100644 --- a/reference/docs-conceptual/install/install-powershell-on-macos.md +++ b/reference/docs-conceptual/install/install-powershell-on-macos.md @@ -1,6 +1,6 @@ --- description: How to install PowerShell on macOS -ms.date: 11/19/2025 +ms.date: 12/15/2025 title: Install PowerShell on macOS --- @@ -21,8 +21,8 @@ with a previous version, reinstall the previous version using the [binary archiv There are several ways to install PowerShell on macOS. Choose one of the following methods: -- Install using [Homebrew][05]. Homebrew is the preferred package manager for macOS. -- Install via [Direct Download][06]. +- Install using [Homebrew][06]. Homebrew is the preferred package manager for macOS. +- Install via [Direct Download][05]. - Install as [a .NET Global tool][04]. - Install from [binary archives][03]. @@ -124,13 +124,15 @@ brew upgrade powershell-lts Starting with version 7.2, PowerShell supports the Apple M-series Arm-based processors. Download the install package from the [releases][11] page onto your Mac. The links to the current versions are: +- PowerShell 7.4 (LTS) + - Arm64 processors - [powershell-7.4.13-osx-arm64.pkg][16] + - x64 processors - [powershell-7.4.13-osx-x64.pkg][18] - PowerShell 7.5 - Arm64 processors - [powershell-7.5.4-arm64.pkg][20] - x64 processors - [powershell-7.5.4-osx-x64.pkg][22] - -- PowerShell 7.4 - - Arm64 processors - [powershell-7.4.13-osx-arm64.pkg][16] - - x64 processors - [powershell-7.4.13-osx-x64.pkg][18] +- PowerShell 7.6-preview + - Arm64 processors - [powershell-7.6.0-preview.6-osx-arm64.pkg][24] + - x64 processors - [powershell-7.6.0-preview.6-osx-x64.pkg][26] There are two ways to install PowerShell using the Direct Download method. @@ -152,7 +154,7 @@ Install PowerShell using Finder: 1. Select the **Done** button to close the prompt. This error message comes from the Gatekeeper feature of macOS. For more information, see -[Safely open apps on your Mac - Apple Support][25]. +[Safely open apps on your Mac - Apple Support][29]. After you've tried to open the package, follow these steps: @@ -210,13 +212,15 @@ dependencies. Download the install package from the [releases][11] page onto your Mac. The links to the current versions are: -- PowerShell 7.5-preview - - Arm64 processors - [powershell-7.5.4-osx-arm64.tar.gz][21] - - x64 processors - [powershell-7.5.4-osx-x64.tar.gz][23] - - PowerShell 7.4 (LTS) - Arm64 processors - [powershell-7.4.13-osx-arm64.tar.gz][17] - x64 processors - [powershell-7.4.13-osx-x64.tar.gz][19] +- PowerShell 7.5 + - Arm64 processors - [powershell-7.5.4-osx-arm64.tar.gz][21] + - x64 processors - [powershell-7.5.4-osx-x64.tar.gz][23] +- PowerShell 7.6-preview + - Arm64 processors - [powershell-7.6.0-preview.6-osx-arm64.tar.gz][25] + - x64 processors - [powershell-7.6.0-preview.6-osx-x64.tar.gz][27] Use the following commands to install PowerShell from the binary archive. Change the download URL to match the version you want to install. @@ -270,7 +274,7 @@ the paths using `sudo rm`. - Default modules are read from `$PSHOME/Modules` - PSReadLine history is recorded to `~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt` -PowerShell respects the [XDG Base Directory Specification][24] on macOS. +PowerShell respects the [XDG Base Directory Specification][28] on macOS. ## Supported versions @@ -293,8 +297,8 @@ support those methods. [02]: /dotnet/core/tools/global-tools [03]: #binary-archives [04]: #install-as-a-net-global-tool -[05]: #install-using-homebrew -[06]: #install-the-package-via-direct-download +[05]: #install-the-package-via-direct-download +[06]: #install-using-homebrew [07]: #paths [08]: #supported-versions [09]: https://aka.ms/powershell-release?tag=lts @@ -312,5 +316,9 @@ support those methods. [21]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-arm64.tar.gz [22]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-x64.pkg [23]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-x64.tar.gz -[24]: https://specifications.freedesktop.org/basedir/latest/ -[25]: https://support.apple.com/102445 +[24]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/powershell-7.6.0-preview.6-osx-arm64.pkg +[25]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/powershell-7.6.0-preview.6-osx-arm64.tar.gz +[26]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/powershell-7.6.0-preview.6-osx-x64.pkg +[27]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/powershell-7.6.0-preview.6-osx-x64.tar.gz +[28]: https://specifications.freedesktop.org/basedir/latest/ +[29]: https://support.apple.com/102445 diff --git a/reference/docs-conceptual/install/install-powershell-on-windows-iot-nano.md b/reference/docs-conceptual/install/install-powershell-on-windows-iot-nano.md index a69915fa5def..a91e77af3506 100644 --- a/reference/docs-conceptual/install/install-powershell-on-windows-iot-nano.md +++ b/reference/docs-conceptual/install/install-powershell-on-windows-iot-nano.md @@ -1,6 +1,6 @@ --- description: How to install PowerShell on Windows IoT and Nano Server. -ms.date: 11/19/2025 +ms.date: 12/15/2025 title: Install PowerShell on Windows IoT and Nano Server --- # Install PowerShell on Windows IoT and Nano Server diff --git a/reference/docs-conceptual/install/install-powershell-on-windows.md b/reference/docs-conceptual/install/install-powershell-on-windows.md index d1910a80a8c5..01fa295b7ccd 100644 --- a/reference/docs-conceptual/install/install-powershell-on-windows.md +++ b/reference/docs-conceptual/install/install-powershell-on-windows.md @@ -1,6 +1,6 @@ --- description: How to install PowerShell on Windows -ms.date: 11/19/2025 +ms.date: 12/15/2025 title: Install PowerShell on Windows --- # Install PowerShell on Windows @@ -82,9 +82,9 @@ Latest stable release: Latest Preview release: -- [PowerShell-7.6.0-preview.5-win-x64.msi][19] -- [PowerShell-7.6.0-preview.5-win-x86.msi][20] -- [PowerShell-7.6.0-preview.5-win-arm64.msi][18] +- [PowerShell-7.6.0-preview.6-win-x64.msi][19] +- [PowerShell-7.6.0-preview.6-win-x86.msi][20] +- [PowerShell-7.6.0-preview.6-win-arm64.msi][18] Once downloaded, double-click the installer file and follow the prompts. @@ -296,9 +296,9 @@ can't support those methods. [15]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/PowerShell-7.5.4-win-x64.zip [16]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/PowerShell-7.5.4-win-x86.msi [17]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/PowerShell-7.5.4-win-x86.zip -[18]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.5/PowerShell-7.6.0-preview.5-win-arm64.msi -[19]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.5/PowerShell-7.6.0-preview.5-win-x64.msi -[20]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.5/PowerShell-7.6.0-preview.5-win-x86.msi +[18]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/PowerShell-7.6.0-preview.6-win-arm64.msi +[19]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/PowerShell-7.6.0-preview.6-win-x64.msi +[20]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/PowerShell-7.6.0-preview.6-win-x86.msi [21]: https://github.com/PowerShell/PowerShell/releases/latest [22]: https://www.microsoft.com/store/apps/9MZ1SNWT0N5D [23]: microsoft-update-faq.yml diff --git a/reference/docs-conceptual/install/install-rhel.md b/reference/docs-conceptual/install/install-rhel.md index fe47b9ffff1e..d34abeae4a7d 100644 --- a/reference/docs-conceptual/install/install-rhel.md +++ b/reference/docs-conceptual/install/install-rhel.md @@ -1,6 +1,6 @@ --- description: Information about installing PowerShell on Red Hat Enterprise Linux (RHEL) -ms.date: 11/19/2025 +ms.date: 12/15/2025 title: Installing PowerShell on Red Hat Enterprise Linux (RHEL) --- # Installing PowerShell on Red Hat Enterprise Linux (RHEL) @@ -70,6 +70,8 @@ The link to the current version is: - `https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-1.rh.x86_64.rpm` - PowerShell 7.5.4 universal package for supported versions of RHEL - `https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-1.rh.x86_64.rpm` +- PowerShell 7.6-preview universal package for supported versions of RHEL + - `https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/powershell-preview-7.6.0-preview.6-1.rh.x86_64.rpm` The following shell script downloads and installs the current preview release of PowerShell. You can change the URL to download the version of PowerShell that you want to install. diff --git a/reference/docs-conceptual/install/install-ubuntu.md b/reference/docs-conceptual/install/install-ubuntu.md index fe097c1ee044..93ec2c3fb63b 100644 --- a/reference/docs-conceptual/install/install-ubuntu.md +++ b/reference/docs-conceptual/install/install-ubuntu.md @@ -1,6 +1,6 @@ --- description: Information about installing PowerShell on Ubuntu -ms.date: 11/19/2025 +ms.date: 12/15/2025 title: Installing PowerShell on Ubuntu --- # Installing PowerShell on Ubuntu @@ -85,7 +85,9 @@ The link to the current version is: - PowerShell 7.4 (LTS) universal package for supported versions of Ubuntu - `https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell_7.4.13-1.deb_amd64.deb` - PowerShell 7.5 universal package for supported versions of Ubuntu - - `https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-preview_7.5.4-1.deb_amd64.deb` + - `https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell_7.5.4-1.deb_amd64.deb` +- PowerShell 7.6-preview universal package for supported versions of Ubuntu + - `https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-preview.6/powershell-preview_7.6.0-preview.6-1.deb_amd64.deb` The following shell script downloads and installs the current preview release of PowerShell. You can change the URL to download the version of PowerShell that you want to install. diff --git a/reference/docs-conceptual/learn/experimental-features.md b/reference/docs-conceptual/learn/experimental-features.md index 6ad5366e60d9..712be36bb5be 100644 --- a/reference/docs-conceptual/learn/experimental-features.md +++ b/reference/docs-conceptual/learn/experimental-features.md @@ -1,6 +1,6 @@ --- description: Lists the currently available experimental features and how to use them. -ms.date: 11/21/2025 +ms.date: 12/09/2025 title: Using Experimental Features in PowerShell --- # Using Experimental Features in PowerShell @@ -15,14 +15,14 @@ breaking changes. > [!CAUTION] > Experimental features aren't intended to be used in production since the changes are allowed to be > breaking. Experimental features aren't officially supported. However, we appreciate any feedback -> and bug reports. You can file issues in the [GitHub source repository][16]. +> and bug reports. You can file issues in the [GitHub source repository][17]. For more information about enabling or disabling these features, see [about_Experimental_Features][05]. ## Experimental feature lifecycle -The [Get-ExperimentalFeature][19] cmdlet returns all experimental features available to PowerShell. +The [Get-ExperimentalFeature][20] cmdlet returns all experimental features available to PowerShell. Experimental features can come from modules or the PowerShell engine. Module-based experimental features are only available after you import the module. In the following example, the **PSDesiredStateConfiguration** isn't loaded, so the `PSDesiredStateConfiguration.InvokeDscResource` @@ -43,7 +43,7 @@ PSSerializeJSONLongEnumAsNumber True PSEngine Serialize enums based on long o PSSubsystemPluginModel True PSEngine A plugin model for registering and un-registering PowerShell subsyste… ``` -Use the [Enable-ExperimentalFeature][18] and [Disable-ExperimentalFeature][17] cmdlets to enable or +Use the [Enable-ExperimentalFeature][19] and [Disable-ExperimentalFeature][18] cmdlets to enable or disable a feature. You must start a new PowerShell session for this change to be in effect. Run the following command to enable the `PSCommandNotFoundSuggestion` feature: @@ -86,13 +86,14 @@ Legend | [PSCommandNotFoundSuggestion][06] | ![Experimental][02] | ![Mainstream][01] | ![Mainstream][01] | | [PSCommandWithArgs][07] | ![Experimental][02] | ![Mainstream][01] | ![Mainstream][01] | | [PSDesiredStateConfiguration.InvokeDscResource][08] | ![Experimental][02] | ![Experimental][02] | ![Experimental][02] | -| [PSFeedbackProvider][09] | ![Experimental][02] | ![Experimental][02] | ![Experimental][02] | +| [PSFeedbackProvider][09] | ![Experimental][02] | ![Experimental][02] | ![Mainstream][01] | | [PSLoadAssemblyFromNativeCode][10] | ![Experimental][02] | ![Experimental][02] | ![Experimental][02] | | [PSModuleAutoLoadSkipOfflineFiles][11] | ![Experimental][02] | ![Mainstream][01] | ![Mainstream][01] | -| [PSNativeWindowsTildeExpansion][12] | | ![Experimental][02] | ![Experimental][02] | -| [PSRedirectToVariable][13] | | ![Experimental][02] | ![Experimental][02] | -| [PSSerializeJSONLongEnumAsNumber][14] | | ![Experimental][02] | ![Experimental][02] | -| [PSSubsystemPluginModel][15] | ![Experimental][02] | ![Experimental][02] | ![Experimental][02] | +| [PSNativeWindowsTildeExpansion][12] | | ![Experimental][02] | ![Mainstream][01] | +| [PSProfileDSCResource][13] | | | ![Experimental][02] | +| [PSRedirectToVariable][14] | | ![Experimental][02] | ![Mainstream][01] | +| [PSSerializeJSONLongEnumAsNumber][15] | | ![Experimental][02] | ![Experimental][02] | +| [PSSubsystemPluginModel][16] | ![Experimental][02] | ![Experimental][02] | ![Mainstream][01] | ### PSCommandNotFoundSuggestion @@ -155,6 +156,10 @@ use or support MOF compilation. For more information, see ### PSFeedbackProvider +> [!NOTE] +> This experimental feature was added in PowerShell 7.4-preview.3. This feature became mainstream in +> PowerShell 7.6-preview.6. + When you enable this feature, PowerShell uses a new feedback provider to give you feedback when a command can't be found. The feedback provider is extensible, and can be implemented by third-party modules. The feedback provider can be used by other subsystems, such as the predictor subsystem, to @@ -170,8 +175,6 @@ This feature includes two built-in feedback providers: in an interactive run, and for providing predictive IntelliSense results for the next command line. -This feature was added in PowerShell 7.4-preview.3. - ### PSLoadAssemblyFromNativeCode Exposes an API to allow assembly loading from native code. @@ -190,10 +193,54 @@ always kept on disk. This feature was added in PowerShell 7.4-preview.1. +### PSNativeWindowsTildeExpansion + +> [!NOTE] +> This experimental feature was added in PowerShell 7.5-preview.2. This feature became mainstream in +> PowerShell 7.6-preview.6. + +When this feature is enabled, PowerShell expands unquoted tilde (`~`) to the user's current home +folder before invoking native commands. The following examples show how the feature works. + +With the feature disabled, the tilde is passed to the native command as a literal string. + +```powershell +PS> cmd.exe /c echo ~ +~ +``` + +With the feature enabled, PowerShell expands the tilde before it's passed to the native command. + +```powershell +PS> cmd.exe /c echo ~ +C:\Users\username +``` + +This feature only applies to Windows. On non-Windows platforms, tilde expansion is handled natively. + +### PSProfileDSCResource + +> [!NOTE] +> This experimental feature was added in PowerShell 7.6-preview.6. + +The PowerShell 7.6-preview.6 release added this feature as an advertisement for a new DSCv3 +resource. The experimental feature flag doesn't do anything. You can use the new DSC v3 resource +regardless of whether this feature is enabled or disabled. + +The `Microsoft.PowerShell/Profile` resource enables you to manage PowerShell profiles using Desired +State Configuration (DSC) v3. This release includes two new files in the `$PSHOME` folder: + +- `pwsh.profile.dsc.resource.json` - DSC v3 resource manifest file +- `pwsh.profile.resource.ps1` - DSC v3 resource implementation file + +The resource supports operations to get, set, and export profile content for different profile +types. For more information, see the notes in the PR [PowerShell/PowerShell#26157][26157]. + ### PSRedirectToVariable > [!NOTE] -> This experimental feature was added in PowerShell 7.5-preview.4. +> This experimental feature was added in PowerShell 7.5-preview.4. This feature became mainstream in +> PowerShell 7.6-preview.6. When enabled, this feature adds support for redirecting to the Variable: drive. This feature allows you to redirect data to a variable using the `Variable:name` syntax. PowerShell inspects the target @@ -217,48 +264,12 @@ Output 2 WARNING: Warning, Warning! ``` -### PSSubsystemPluginModel - -This feature enables the subsystem plugin model in PowerShell. The feature makes it possible to -separate components of `System.Management.Automation.dll` into individual subsystems that reside in -their own assembly. This separation reduces the disk footprint of the core PowerShell engine and -allows these components to become optional features for a minimal PowerShell installation. - -Currently, only the **CommandPredictor** subsystem is supported. This subsystem is used along with -the PSReadLine module to provide custom prediction plugins. In future, **Job**, -**CommandCompleter**, **Remoting** and other components could be separated into subsystem assemblies -outside of `System.Management.Automation.dll`. - -The experimental feature includes a new cmdlet, [Get-PSSubsystem][20]. This cmdlet is only available -when the feature is enabled. This cmdlet returns information about the subsystems that are available -on the system. - -### PSNativeWindowsTildeExpansion - -When this feature is enabled, PowerShell expands unquoted tilde (`~`) to the user's current home -folder before invoking native commands. The following examples show how the feature works. - -With the feature disabled, the tilde is passed to the native command as a literal string. - -```powershell -PS> cmd.exe /c echo ~ -~ -``` - -With the feature enabled, PowerShell expands the tilde before it's passed to the native command. - -```powershell -PS> cmd.exe /c echo ~ -C:\Users\username -``` - -This feature only applies to Windows. On non-Windows platforms, tilde expansion is handled natively. - -This feature was added in PowerShell 7.5-preview.2. - ### PSSerializeJSONLongEnumAsNumber -This feature enables the cmdlet [ConvertTo-Json][21] to serialize any enum values based on +> [!NOTE] +> This experimental feature was added in PowerShell 7.5-preview.5. + +This feature enables the cmdlet [ConvertTo-Json][22] to serialize any enum values based on `Int64/long` or `UInt64/ulong` as a numeric value rather than the string representation of that enum value. This aligns the behavior of enum serialization with other enum base types where the cmdlet serializes enums as their numeric value. Use the **EnumsAsStrings** parameter to serialize as the @@ -286,6 +297,25 @@ For example: # { "Key": "Cmdlets" } ``` +### PSSubsystemPluginModel + +> [!NOTE] +> This feature became mainstream in PowerShell 7.6-preview.6. + +This feature enables the subsystem plugin model in PowerShell. The feature makes it possible to +separate components of `System.Management.Automation.dll` into individual subsystems that reside in +their own assembly. This separation reduces the disk footprint of the core PowerShell engine and +allows these components to become optional features for a minimal PowerShell installation. + +Currently, only the **CommandPredictor** subsystem is supported. This subsystem is used along with +the PSReadLine module to provide custom prediction plugins. In future, **Job**, +**CommandCompleter**, **Remoting** and other components could be separated into subsystem assemblies +outside of `System.Management.Automation.dll`. + +The experimental feature includes a new cmdlet, [Get-PSSubsystem][21]. This cmdlet is only available +when the feature is enabled. This cmdlet returns information about the subsystems that are available +on the system. + [01]: ../../media/shared/check-mark-button-2705.svg [02]: ../../media/shared/construction-sign-1f6a7.svg @@ -299,12 +329,14 @@ For example: [10]: #psloadassemblyfromnativecode [11]: #psmoduleautoloadskipofflinefiles [12]: #psnativewindowstildeexpansion -[13]: #psredirecttovariable -[14]: #psserializejsonlongenumasnumber -[15]: #pssubsystempluginmodel -[16]: https://github.com/PowerShell/PowerShell/issues/new/choose -[17]: xref:Microsoft.PowerShell.Core.Disable-ExperimentalFeature -[18]: xref:Microsoft.PowerShell.Core.Enable-ExperimentalFeature -[19]: xref:Microsoft.PowerShell.Core.Get-ExperimentalFeature -[20]: xref:Microsoft.PowerShell.Core.Get-PSSubsystem -[21]: xref:Microsoft.PowerShell.Utility.ConvertTo-Json +[13]: #psprofiledscresource +[14]: #psredirecttovariable +[15]: #psserializejsonlongenumasnumber +[16]: #pssubsystempluginmodel +[17]: https://github.com/PowerShell/PowerShell/issues/new/choose +[18]: xref:Microsoft.PowerShell.Core.Disable-ExperimentalFeature +[19]: xref:Microsoft.PowerShell.Core.Enable-ExperimentalFeature +[20]: xref:Microsoft.PowerShell.Core.Get-ExperimentalFeature +[21]: xref:Microsoft.PowerShell.Core.Get-PSSubsystem +[22]: xref:Microsoft.PowerShell.Utility.ConvertTo-Json +[26157]: https://github.com/PowerShell/PowerShell/pull/26157 diff --git a/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-76.md b/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-76.md index 79f20e1b50e5..b5e06332c408 100644 --- a/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-76.md +++ b/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-76.md @@ -1,21 +1,21 @@ --- title: What's New in PowerShell 7.6 description: New features and changes released in PowerShell 7.6 -ms.date: 10/09/2025 +ms.date: 12/09/2025 --- # What's New in PowerShell 7.6 -PowerShell 7.6-preview.5 includes the following features, updates, and breaking changes. PowerShell +PowerShell 7.6-preview.6 includes the following features, updates, and breaking changes. PowerShell 7.6 is built on .NET 9.0.101 GA release. -For a complete list of changes, see the [CHANGELOG][04] in the GitHub repository. +For a complete list of changes, see the [CHANGELOG][log] in the GitHub repository. ## Updated modules -PowerShell 7.6-preview.5 includes the following updated modules: +PowerShell 7.6-preview.6 includes the following updated modules: -- **Microsoft.PowerShell.PSResourceGet** v1.1.0 +- **Microsoft.PowerShell.PSResourceGet** v1.2.0-preview5 - **PSReadLine** v2.4.4-beta4 - **Microsoft.PowerShell.ThreadJob** v2.2.0 - **ThreadJob** v2.1.0 @@ -35,9 +35,12 @@ name, the **ThreadJob** v2.1.0 module is a proxy module that points to the ## Tab completion improvements -- Use parameter `HelpMessage` for tool tip in parameter completion ([#25108][25108]) (Thanks @jborean93!) +- Properly Expand Aliases to their actual ResolvedCommand ([#26571][26571]) (Thanks @kilasuit!) +- Use parameter `HelpMessage` for tool tip in parameter completion ([#25108][25108]) (Thanks + @jborean93!) - Remove duplicate modules from completion results ([#25538][25538]) (Thanks @MartinGC94!) -- Add completion for variables assigned in `ArrayLiteralAst` and `ParenExpressionAst` ([#25303][25303]) (Thanks @MartinGC94!) +- Add completion for variables assigned in `ArrayLiteralAst` and `ParenExpressionAst` + ([#25303][25303]) (Thanks @MartinGC94!) - Fix tab completion for env/function variables ([#25346][25346]) (Thanks @jborean93!) - Update Named and Statement block type inference to not consider **AssignmentStatements** and Increment/decrement operators as part of their output ([#21137][21137]) (Thanks @MartinGC94!) @@ -88,8 +91,9 @@ name, the **ThreadJob** v2.1.0 module is a proxy module that points to the ## Cmdlet improvements -- Fix Out-GridView by replacing use of obsolete BinaryFormatter with custom implementation ([#25497][25497]) - (Thanks @mawosoft!) +- Add `-Delimiter` parameter to `Get-Clipboard` ([#26572][26572]) (Thanks @MartinGC94!) +- Fix Out-GridView by replacing use of obsolete BinaryFormatter with custom implementation + ([#25497][25497]) (Thanks @mawosoft!) - Improve verbose and debug logging level messaging in web cmdlets ([#25510][25510]) (Thanks @JustinGrote!) - Improve debug logging of Web cmdlet request and response ([#25479][25479]) (Thanks @JustinGrote!) @@ -137,6 +141,9 @@ name, the **ThreadJob** v2.1.0 module is a proxy module that points to the ## Engine improvements +- Fix a regression in the API `CompletionCompleters.CompleteFilename()` that causes null reference + exception ([#26487][26487]) +- Close pipe client handles after creating the child ssh process ([#26564][26564]) - Update the **PSDiagnostics** module to manage the PowerShellCore provider in PowerShell 7 ([#25590][25590]) - Allow opt-out of the named-pipe listener using the environment variable @@ -176,18 +183,30 @@ name, the **ThreadJob** v2.1.0 module is a proxy module that points to the ## Experimental features -The following experimental features are included in PowerShell 7.6-preview.3: +PowerShell 7.6-preview.6 includes the following changes to experimental features. -- [PSNativeWindowsTildeExpansion][01] - Add tilde expansion for Windows-native executables -- [PSRedirectToVariable][02] - Allow redirecting to a variable -- [PSSerializeJSONLongEnumAsNumber][03] - `ConvertTo-Json` now treats large enums as numbers +The following features have been converted to mainstream features: + +- [PSFeedbackProvider][01] +- [PSNativeWindowsTildeExpansion][02] +- [PSRedirectToVariable][04] +- [PSSubsystemPluginModel][06] + +This release includes the following experimental features: + +- [PSSerializeJSONLongEnumAsNumber][05] - `ConvertTo-Json` now treats large enums as numbers +- [PSProfileDSCResource][03] - Add DSC v3 resource for PowerShell Profiles -[01]: ../learn/experimental-features.md#psnativewindowstildeexpansion -[02]: ../learn/experimental-features.md#psredirecttovariable -[03]: ../learn/experimental-features.md#psserializejsonlongenumasnumber -[04]: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/preview.md +[01]: ../learn/experimental-features.md#psfeedbackprovider +[02]: ../learn/experimental-features.md#psnativewindowstildeexpansion +[03]: ../learn/experimental-features.md#psprofiledscresource +[04]: ../learn/experimental-features.md#psredirecttovariable +[05]: ../learn/experimental-features.md#psserializejsonlongenumasnumber +[06]: ../learn/experimental-features.md#pssubsystempluginmodel + +[log]: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/preview.md [14553]: https://github.com/PowerShell/PowerShell/pull/14553 [17687]: https://github.com/PowerShell/PowerShell/pull/17687 @@ -278,3 +297,7 @@ The following experimental features are included in PowerShell 7.6-preview.3: [26081]: https://github.com/PowerShell/PowerShell/pull/26081 [26086]: https://github.com/PowerShell/PowerShell/pull/26086 [26118]: https://github.com/PowerShell/PowerShell/pull/26118 +[26487]: https://github.com/PowerShell/PowerShell/pull/26487 +[26564]: https://github.com/PowerShell/PowerShell/pull/26564 +[26571]: https://github.com/PowerShell/PowerShell/pull/26571 +[26572]: https://github.com/PowerShell/PowerShell/pull/26572