From 7d30f0173a3ba1a819f4a38c14e42508f52c3c1d Mon Sep 17 00:00:00 2001 From: Pedro Miguel Justo <40605312+pmsjt@users.noreply.github.com> Date: Wed, 2 Oct 2024 05:59:51 -0700 Subject: [PATCH 1/2] Add the link to the Arm64 MSI (#11434) If there is a template auto-generating these pages, please make sure it is updated so this doesn't get missed again. --- .../docs-conceptual/install/Installing-PowerShell-on-Windows.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reference/docs-conceptual/install/Installing-PowerShell-on-Windows.md b/reference/docs-conceptual/install/Installing-PowerShell-on-Windows.md index c990a387f590..26262a28f15e 100644 --- a/reference/docs-conceptual/install/Installing-PowerShell-on-Windows.md +++ b/reference/docs-conceptual/install/Installing-PowerShell-on-Windows.md @@ -78,6 +78,7 @@ GitHub. - [PowerShell-7.4.5-win-x64.msi][28] - [PowerShell-7.4.5-win-x86.msi][30] +- [PowerShell-7.4.5-win-arm64.msi][36] Once downloaded, double-click the installer file and follow the prompts. @@ -422,3 +423,4 @@ can't support those methods. [33]: https://www.microsoft.com/store/apps/9MZ1SNWT0N5D [34]: microsoft-update-faq.yml [35]: https://techcommunity.microsoft.com/t5/windows-server-insiders/announcing-windows-server-preview-build-26085/m-p/4098829 +[36]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.5/PowerShell-7.4.5-win-arm64.msi From 35d2f5930d9a99a1e4696affa2b96a9c764cde55 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 2 Oct 2024 13:49:50 -0500 Subject: [PATCH 2/2] Update release information for 7.5-p5 (#11424) * Update release information for 7.5-p5 * Add PSSerializeJSONLongEnumAsNumber to release notes * Add changes to Resolve-Path and Convert-Path --- .../About/about_Pwsh.md | 5 +- .../About/about_Telemetry.md | 9 ++- .../Convert-Path.md | 51 +++++++++++++++- .../Resolve-Path.md | 61 ++++++++++++++++++- .../learn/experimental-features.md | 15 ++++- .../whats-new/What-s-New-in-PowerShell-75.md | 51 ++++++++++++---- 6 files changed, 170 insertions(+), 22 deletions(-) diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Pwsh.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Pwsh.md index 5eb5cfc721ac..72e7174078fd 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Pwsh.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Pwsh.md @@ -1,7 +1,7 @@ --- description: Explains how to use the `pwsh` command-line interface. Displays the command-line parameters and describes the syntax. Locale: en-US -ms.date: 09/02/2024 +ms.date: 09/24/2024 no-loc: [-File, -f, -Command, -c, -CommandWithArgs, -cwa, -ConfigurationName, -config, -CustomPipeName, -EncodedCommand, -e, -ec, -ExecutionPolicy, -ex, -ep, -InputFormat, -inp, -if, -Interactive, -i, -Login, -l, -MTA, -NoExit, -noe, -NoLogo, -nol, -NonInteractive, -noni, -NoProfile, -nop, -OutputFormat, -o, -of, -SettingsFile, -settings, -SSHServerMode, -sshs, -STA, -Version, -v, -WindowStyle, -w, -WorkingDirectory, -wd, -Help] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pwsh?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -207,7 +207,8 @@ string or script block. For more information, see `$LASTEXITCODE` in ### -CommandWithArgs | -cwa -This is an experimental feature added in 7.4. +This is an experimental feature added in 7.4 and became mainstream in +PowerShell 7.5-preview.5. Executes a PowerShell command with arguments. Unlike `-Command`, this parameter populates the `$args` built-in variable that can be used by the command. diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Telemetry.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Telemetry.md index c8387cd29a09..3b74214744c4 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Telemetry.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Telemetry.md @@ -1,8 +1,9 @@ --- description: Describes the telemetry collected in PowerShell and how to opt-out. Locale: en-US -ms.date: 04/22/2024 +ms.date: 09/24/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_telemetry?view=powershell-7.5&WT.mc_id=ps-gethelp +ms.custom: 7.5-preview.5 schema: 2.0.0 title: about_Telemetry --- @@ -51,6 +52,12 @@ PowerShell sends the following information during the session: - Value of `$PSNativeCommandUseErrorActionPreference` preference variable, either `true`, `false` or `unset` - The count of remote session open operations +- The names of registered subsystems: `Completion` and `general`. If the name + of the subsystem name not one of those, then `anonymous` is submitted as the + name. +- The count of `CommandNotFound` feedback suggestions provided. +- The count of `PowerShellUnsafeAssemblyLoad` usage and whether the load was + successful or not. PowerShell sends this information periodically during the lifetime of the session for all host applications. diff --git a/reference/7.5/Microsoft.PowerShell.Management/Convert-Path.md b/reference/7.5/Microsoft.PowerShell.Management/Convert-Path.md index 0fa8e4ba2113..9cf4fb486c47 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Convert-Path.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Convert-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: 09/05/2023 +ms.date: 09/25/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/convert-path?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: Convert-Path @@ -61,8 +61,57 @@ PS C:\> Convert-Path ~ C:\Users\User01 ``` +### Example 4: Convert paths for hidden items + +By default, `Convert-Path` does not return hidden items. This example uses the **Force** parameter +to find hidden items. The `Get-Item` command confirms that the `.git` folder is hidden. Using +`Convert-Path` without the **Force** parameter returns only the visible items. Adding the **Force** +parameter returns all items, including hidden items. + +```powershell +PS> Get-Item .git -Force + + Directory: D:\Git\PS-Docs\PowerShell-Docs + +Mode LastWriteTime Length Name +---- ------------- ------ ---- +d--h- 9/25/2024 4:46 PM .git + +PS> Convert-Path .git* +D:\Git\PS-Docs\PowerShell-Docs\.github +D:\Git\PS-Docs\PowerShell-Docs\.gitattributes +D:\Git\PS-Docs\PowerShell-Docs\.gitignore + +PS> Convert-Path .git* -Force +D:\Git\PS-Docs\PowerShell-Docs\.git +D:\Git\PS-Docs\PowerShell-Docs\.github +D:\Git\PS-Docs\PowerShell-Docs\.gitattributes +D:\Git\PS-Docs\PowerShell-Docs\.gitignore +``` + ## PARAMETERS +### -Force + +Allows the cmdlet to get items that otherwise can't be accessed by the user, such as hidden or +system files. The **Force** parameter doesn't override security restrictions. Implementation varies +among providers. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). + +This parameter was added in PowerShell 7.5-preview.5. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -LiteralPath Specifies, as a string array, the path to be converted. The value of the **LiteralPath** parameter diff --git a/reference/7.5/Microsoft.PowerShell.Management/Resolve-Path.md b/reference/7.5/Microsoft.PowerShell.Management/Resolve-Path.md index 5ac131375e22..68d0e3f73d4e 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Resolve-Path.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Resolve-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: 12/18/2023 +ms.date: 09/25/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/resolve-path?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: Resolve-Path @@ -19,14 +19,14 @@ Resolves the wildcard characters in a path, and displays the path contents. ``` Resolve-Path [-Path] [-Relative] [-RelativeBasePath ] - [-Credential ] [] + [-Credential ] [-Force] [] ``` ### LiteralPath ``` Resolve-Path -LiteralPath [-Relative] [-RelativeBasePath ] - [-Credential ] [] + [-Credential ] [-Force] [] ``` ## DESCRIPTION @@ -123,6 +123,40 @@ Resolve-Path -Path $ExecutablePath -RelativeBasePath $env:TEMP -Relative ..\..\..\..\..\Program Files\PowerShell\7\pwsh.exe ``` +### Example 8: Resolve paths for hidden items + +By default, `Resolve-Path` does not return hidden items. This example uses the **Force** parameter +to resolve hidden items. The `Get-Item` command confirms that the `.git` folder is hidden. Using +`Resolve-Path` without the **Force** parameter returns only the visible items. Adding the **Force** +parameter returns all items, including hidden items. + +```powershell +PS> Get-Item .git -Force + + Directory: D:\Git\PS-Docs\PowerShell-Docs + +Mode LastWriteTime Length Name +---- ------------- ------ ---- +d--h- 9/25/2024 4:46 PM .git + +PS> Resolve-Path .git* + +Path +---- +D:\Git\PS-Docs\PowerShell-Docs\.github +D:\Git\PS-Docs\PowerShell-Docs\.gitattributes +D:\Git\PS-Docs\PowerShell-Docs\.gitignore + +PS> Resolve-Path .git* -Force + +Path +---- +D:\Git\PS-Docs\PowerShell-Docs\.git +D:\Git\PS-Docs\PowerShell-Docs\.github +D:\Git\PS-Docs\PowerShell-Docs\.gitattributes +D:\Git\PS-Docs\PowerShell-Docs\.gitignore +``` + ## PARAMETERS ### -Credential @@ -149,6 +183,27 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Force + +Allows the cmdlet to get items that otherwise can't be accessed by the user, such as hidden or +system files. The **Force** parameter doesn't override security restrictions. Implementation varies +among providers. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). + +This parameter was added in PowerShell 7.5-preview.5. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -LiteralPath Specifies the path to be resolved. The value of the **LiteralPath** parameter is used exactly as diff --git a/reference/docs-conceptual/learn/experimental-features.md b/reference/docs-conceptual/learn/experimental-features.md index bb79fbcb5533..1f52ccbaa599 100644 --- a/reference/docs-conceptual/learn/experimental-features.md +++ b/reference/docs-conceptual/learn/experimental-features.md @@ -84,7 +84,7 @@ Legend | Name | 7.2 | 7.4 | 7.5 (preview) | | --------------------------------------------------- | :-----------------: | :-----------------: | :-----------------: | -| [PSCommandNotFoundSuggestion][10] | ![Experimental][02] | ![Experimental][02] | ![Experimental][02] | +| [PSCommandNotFoundSuggestion][10] | ![Experimental][02] | ![Experimental][02] | ![Mainstream][01] | | [PSDesiredStateConfiguration.InvokeDscResource][14] | ![Experimental][02] | ![Experimental][02] | ![Experimental][02] | | [PSNativePSPathResolution][21] | ![Experimental][02] | | | | [PSSubsystemPluginModel][23] | ![Experimental][02] | ![Experimental][02] | ![Experimental][02] | @@ -93,8 +93,8 @@ Legend | [PSLoadAssemblyFromNativeCode][16] | ![Experimental][02] | ![Experimental][02] | ![Experimental][02] | | [PSNativeCommandErrorActionPreference][19] | | ![Mainstream][01] | | | [PSFeedbackProvider][15] | | ![Experimental][02] | ![Experimental][02] | -| [PSModuleAutoLoadSkipOfflineFiles][17] | | ![Experimental][02] | ![Experimental][02] | -| [PSCommandWithArgs][11] | | ![Experimental][02] | ![Experimental][02] | +| [PSModuleAutoLoadSkipOfflineFiles][17] | | ![Experimental][02] | ![Mainstream][01] | +| [PSCommandWithArgs][11] | | ![Experimental][02] | ![Mainstream][01] | | [PSNativeWindowsTildeExpansion][22] | | | ![Experimental][02] | | [PSRedirectToVariable][24] | | | ![Experimental][02] | | [PSSerializeJSONLongEnumAsNumber][25] | | | ![Experimental][02] | @@ -117,6 +117,9 @@ For more information, see [about_Automatic_Variables][05]. ### PSCommandNotFoundSuggestion +> [!NOTE] +> This feature became mainstream in PowerShell 7.5-preview.5. + Recommends potential commands based on fuzzy matching search after a **CommandNotFoundException**. ```powershell @@ -134,6 +137,9 @@ gcm, gdr, gcs. ### PSCommandWithArgs +> [!NOTE] +> This feature became mainstream in PowerShell 7.5-preview.5. + This feature enables the `-CommandWithArgs` parameter for `pwsh`. This parameter allows you to execute a PowerShell command with arguments. Unlike `-Command`, this parameter populates the `$args` built-in variable that can be used by the command. @@ -193,6 +199,9 @@ Exposes an API to allow assembly loading from native code. ### PSModuleAutoLoadSkipOfflineFiles +> [!NOTE] +> This feature became mainstream in PowerShell 7.5-preview.5. + With this feature enabled, if a user's **PSModulePath** contains a folder from a cloud provider, such as OneDrive, PowerShell no longer triggers the download of all files contained within that folder. Any file marked as not downloaded are skipped. Users who use cloud providers to sync their diff --git a/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-75.md b/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-75.md index f45e15b46c6f..d47b09567b4d 100644 --- a/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-75.md +++ b/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-75.md @@ -1,13 +1,13 @@ --- title: What's New in PowerShell 7.5 description: New features and changes released in PowerShell 7.5 -ms.date: 08/28/2024 +ms.date: 09/24/2024 --- # What's New in PowerShell 7.5 -PowerShell 7.5-preview.4 includes the following features, updates, and breaking changes. PowerShell -7.5 is built on .NET 9.0.0-preview.3. +PowerShell 7.5-preview.5 includes the following features, updates, and breaking changes. PowerShell +7.5 is built on .NET 9.0.100-rc.1. For a complete list of changes, see the [CHANGELOG][chg] in the GitHub repository. @@ -24,9 +24,9 @@ For a complete list of changes, see the [CHANGELOG][chg] in the GitHub repositor ## Updated modules -PowerShell 7.5-preview.4 includes the following updated modules: +PowerShell 7.5-preview.5 includes the following updated modules: -- **Microsoft.PowerShell.PSResourceGet** v1.1.0-preview1 +- **Microsoft.PowerShell.PSResourceGet** v1.1.0-preview2 - **PSReadLine** v2.3.5 ## Tab completion improvements @@ -105,7 +105,12 @@ Many thanks to **@ArmaanMcleod** and others for all their work to improve tab co - Add **WinGetCommandNotFound** and **CompletionPredictor** modules to track usage ([#21040][21040]) - Add **DateKind** parameter to `ConvertFrom-Json` ([#20925][20925]) (Thanks @jborean93!) - Add **DirectoryInfo** to the OutputType for New-Item ([#21126][21126]) (Thanks @MartinGC94!) -- Fix 1 serialization of array values ([#21085][21085]) (Thanks @jborean93!) +- Fix `Get-Error` serialization of array values ([#21085][21085]) (Thanks @jborean93!) +- Fix `Test-ModuleManifest` so it can use a UNC path ([#24115][24115]) +- Fix `Get-TypeData` to write to the pipeline immediately instead of collecting + data first ([#24236][24236]) (Thanks @MartinGC94) +- Add `-Force` parameter to `Resolve-Path` and `Convert-Path` cmdlets to support wildcard hidden + files [#20981][20981] (Thanks @ArmaanMcleod!) ## Engine improvements @@ -127,18 +132,35 @@ Many thanks to **@ArmaanMcleod** and others for all their work to improve tab co - Fix using assembly to use Path.Combine when constructing assembly paths ([#21169][21169]) - Validate the value for using namespace during semantic checks to prevent declaring invalid namespaces ([#21162][21162]) +- Handle global tool specially when prepending `$PSHome` to PATH ([#24228][24228]) ## Experimental features -- Allow redirecting to a variable ([#20381][20381]) - experimental feature -- Add tilde expansion for windows native executables ([#20402][20402]) (Thanks @domsleee!) - For more information, see [PSNativeWindowsTildeExpansion][01] +The following experimental features were converted to mainstream features in +PowerShell 7.5-preview.5: + +- [PSCommandNotFoundSuggestion][02] +- [PSCommandWithArgs][03] +- [PSModuleAutoLoadSkipOfflineFiles][04] + +The following experimental features are included in PowerShell 7.5-preview.5: + +- [PSRedirectToVariable][05] - Allow redirecting to a variable ([#20381][20381]) +- [PSNativeWindowsTildeExpansion][01] - Add tilde expansion for windows native executables + ([#20402][20402]) (Thanks @domsleee!) +- [PSSerializeJSONLongEnumAsNumber][06] - `ConvertTo-Json` now treats large enums as numbers + ([#20999][20999]) (Thanks @jborean93!) [chg]: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/preview.md [01]: ../learn/experimental-features.md#psnativewindowstildeexpansion +[02]: ../learn/experimental-features.md#pscommandnotfoundsuggestion +[03]: ../learn/experimental-features.md#pscommandwithargs +[04]: ../learn/experimental-features.md#psmoduleautoloadskipofflinefiles +[05]: ../learn/experimental-features.md#psredirecttovariable +[06]: ../learn/experimental-features.md#psserializejsonlongenumasnumber [19896]: https://github.com/PowerShell/PowerShell/pull/19896 [20014]: https://github.com/PowerShell/PowerShell/pull/20014 @@ -152,6 +174,7 @@ Many thanks to **@ArmaanMcleod** and others for all their work to improve tab co [20367]: https://github.com/PowerShell/PowerShell/pull/20367 [20369]: https://github.com/PowerShell/PowerShell/pull/20369 [20371]: https://github.com/PowerShell/PowerShell/pull/20371 +[20381]: https://github.com/PowerShell/PowerShell/pull/20381 [20402]: https://github.com/PowerShell/PowerShell/pull/20402 [20415]: https://github.com/PowerShell/PowerShell/pull/20415 [20419]: https://github.com/PowerShell/PowerShell/pull/20419 @@ -179,9 +202,12 @@ Many thanks to **@ArmaanMcleod** and others for all their work to improve tab co [20913]: https://github.com/PowerShell/PowerShell/pull/20913 [20925]: https://github.com/PowerShell/PowerShell/pull/20925 [20942]: https://github.com/PowerShell/PowerShell/pull/20942 +[20981]: https://github.com/PowerShell/PowerShell/pull/20981 [20994]: https://github.com/PowerShell/PowerShell/pull/20994 +[20999]: https://github.com/PowerShell/PowerShell/pull/20999 [21000]: https://github.com/PowerShell/PowerShell/pull/21000 [21040]: https://github.com/PowerShell/PowerShell/pull/21040 +[21063]: https://github.com/PowerShell/PowerShell/pull/21063 [21085]: https://github.com/PowerShell/PowerShell/pull/21085 [21126]: https://github.com/PowerShell/PowerShell/pull/21126 [21162]: https://github.com/PowerShell/PowerShell/pull/21162 @@ -190,11 +216,9 @@ Many thanks to **@ArmaanMcleod** and others for all their work to improve tab co [21184]: https://github.com/PowerShell/PowerShell/pull/21184 [21223]: https://github.com/PowerShell/PowerShell/pull/21223 [21302]: https://github.com/PowerShell/PowerShell/pull/21302 +[21326]: https://github.com/PowerShell/PowerShell/pull/21326 [21358]: https://github.com/PowerShell/PowerShell/pull/21358 [21529]: https://github.com/PowerShell/PowerShell/pull/21529 -[20381]: https://github.com/PowerShell/PowerShell/pull/20381 -[21063]: https://github.com/PowerShell/PowerShell/pull/21063 -[21326]: https://github.com/PowerShell/PowerShell/pull/21326 [23817]: https://github.com/PowerShell/PowerShell/pull/23817 [23871]: https://github.com/PowerShell/PowerShell/pull/23871 [23891]: https://github.com/PowerShell/PowerShell/pull/23891 @@ -205,3 +229,6 @@ Many thanks to **@ArmaanMcleod** and others for all their work to improve tab co [24065]: https://github.com/PowerShell/PowerShell/pull/24065 [24075]: https://github.com/PowerShell/PowerShell/pull/24075 [24086]: https://github.com/PowerShell/PowerShell/pull/24086 +[24115]: https://github.com/PowerShell/PowerShell/pull/24115 +[24228]: https://github.com/PowerShell/PowerShell/pull/24228 +[24236]: https://github.com/PowerShell/PowerShell/pull/24236