Earlier today, Microsoft made PowerShell version 7.3 generally available. The latest version is built on top of the .NET 7 framework which was also released earlier in the week. The new update brings improvements like better error handling, updated cmdlets, and more. Since this is a non-LTS (Long Term Support) release, it will be supported for 18 months. This latest PowerShell version will not run on Windows 7 as underlying Windows APIs were either updated or removed.
Broadly speaking, here are the major changes in PowerShell 7.3.0:
Improved error handling
Session and remoting improvements
Tab completion improvements
Updated cmdlets
You can find more details about these features on Microsoft's official website. There are also a bunch of experimental features and breaking changes:
Experimental Features
PowerShell 7.3 introduces the following experimental features:
- PSExec - Adds the new
Switch-Process
cmdlet (aliasexec
) to provideexec
compatibility for non-Windows systems. In PowerShell 7.3-preview.8, this feature became mainstream.- PSCleanBlock - Adds
clean
block to script block as a peer tobegin
,process
, andend
to allow easy resource cleanup. In PowerShell 7.3-preview.8, this feature became mainstream.- PSStrictModeAssignment - Adds the StrictMode parameter to
Invoke-Command
to allow specifying strict mode when invoking command locally. In PowerShell 7.3-preview.8, this feature was removed.- PSNativeCommandErrorActionPreference - Adds the
$PSNativeCommandUseErrorActionPreference
variable to enable errors produced by native commands to be PowerShell errors.- PSAMSIMethodInvocationLogging - Extends the data sent to AMSI for inspection to include all invocations of .NET method members. In PowerShell 7.3-preview.8, this feature became mainstream.
- Remove PSNativePSPathResolution experimental feature.
Breaking Changes and Improvements
- In this release, Windows APIs were updated or removed for compliance, which means that PowerShell 7.3 doesn't run on Windows 7. While Windows 7 is no longer supported, previous builds could run on Windows 7.
- PowerShell Direct for Hyper-V is only supported on Windows 10, version 1809 and higher.
Test-Connection
is broken due to an intentional breaking change in .NET 7. It's tracked by #17018- Add
clean
block to script block as a peer tobegin
,process
, andend
to allow easy resource cleanup (#15177)- Change default for
$PSStyle.OutputRendering
to Ansi- Make
Out-String
andOut-File
keep string input unchanged (#17455)- Move the type data definition of System.Security.AccessControl.ObjectSecurity to the Microsoft.PowerShell.Security module (#16355) (Thanks @iSazonov!)
- Before this change, a user doesn't need to explicitly import the Microsoft.PowerShell.Security module to use the code properties defined for an instance of System.Security.AccessControl.ObjectSecurity.
- After this change, a user needs to explicitly import Microsoft.PowerShell.Security module in order to use those code properties and code methods.
You can download and find more details about PowerShell 7.3 on GitHub as well as on Microsoft's site. You can also download it from the Microsoft Store.
Source: Microsoft
10 Comments - Add comment