Microsoft released PowerShell 7.3 as a general release earlier today. The most recent version is based on the earlier this week released.NET 7 framework. The most recent update includes updates to cmdlets, better error handling, and other features. This release will be supported for 18 months because it is not part of the LTS (Long Term Support) program. Due to updated or removed underlying Windows APIs, the most recent PowerShell version will not function on Windows 7.
- Here are the main adjustments made in PowerShell 7.3.0, generally speaking:
- increased error tolerance
- Remoting and session improvements
- Improvements to tab completion
- modernised cmdlets
The official Microsoft website has more information on these features. Additional experimental features and breaking changes include:
Extraordinary Qualities
These test features are available in PowerShell 7.3:
- To provide exec compatibility for non-Windows systems, PSExec adds the new Switch-Process cmdlet (alias exec). This function entered general use in PowerShell 7.3-preview.8.
- PSCleanBlock – Facilitates quick resource cleanup by adding clean block as a peer to the beginning, process, and end of script blocks. This function entered general use in PowerShell 7.3-preview.8.
- In order to specify strict mode when invoking a command locally, PSStrictModeAssignment adds the StrictMode parameter to Invoke-Command. This function was eliminated in PowerShell 7.3-preview.8.
- PSNativeCommandErrorActionPreference – This variable adds the $PSNativeCommandUseErrorActionPreference option to allow errors from native commands to be PowerShell errors.
- PSAMSIMethodInvocationLogging – Adds all.NET method member invocations to the data sent to AMSI for analysis. This function entered general use in PowerShell 7.3-preview.8.
- PSNativePSPathResolution experimental feature should be removed.
New Improvements and Changes
- Because Windows APIs were updated or eliminated for compliance in this release, PowerShell 7.3 is incompatible with Windows 7. Even though Windows 7 is no longer supported, earlier builds were compatible with Windows 7.
- Only versions of Windows 10 up to version 1809 are supported with PowerShell Direct for Hyper-V.
- Because of an intentional breaking change in.NET 7, Test-Connection is damaged. It is followed by #17018.
- To make resource cleanup simple, add clean block to script block as a peer at the beginning, middle, and end of the script (#15177).
- Change $PSStyle’s default setting.
- rendering output to Ansi
- Make Out-String and Out-File maintain the input string’s original state (#17455)
- Move the System type data definition.
- To the Microsoft.PowerShell.Security module, add Security.AccessControl.ObjectSecurity (#16355). (Appreciated @iSazonov!)
- Before this modification, a user could use the code properties set for an instance of System without explicitly importing the Microsoft.PowerShell.Security module.
- Security.AccessControl.ObjectSecurity.
- After this modification, using those code properties and code methods requires explicitly importing the Microsoft.PowerShell.Security module.
Both on GitHub and the Microsoft website, you can download PowerShell 7.3 and find out more information about it. It is also available for download from the Microsoft Store.