Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
PowerShell 7.3 is the next stable release, built on .NET 7.0.
PowerShell 7.3 includes the following features, updates, and breaking changes.
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-Connectionis broken due to an intentional breaking change in .NET 7. It's tracked by #17018- Add
cleanblock to script block as a peer tobegin,process, andendto allow easy resource cleanup (#15177) - Change default for
$PSStyle.OutputRenderingto Host - Make
Out-StringandOut-Filekeep 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.
Tab completion improvements
- PowerShell 7.3 includes PSReadLine 2.2.6, which enables Predictive IntelliSense by default. For more information, see about_PSReadLine.
- Fix tab completion within the script block specified for the
ValidateScriptAttribute. (#14550) (Thanks @MartinGC94!) - Added tab completion for loop labels after
break/continue(#16438) (Thanks @MartinGC94!) - Improve Hashtable completion in multiple scenarios (#16498) (Thanks @MartinGC94!)
- Parameter splatting
- Arguments parameter for
Invoke-CimMethod - FilterHashtable parameter for
Get-WinEvent - Property parameter for the CIM cmdlets
- Removes duplicates from member completion scenarios
- Support forward slashes in network share (UNC path) completion (#17111) (Thanks @sba923!)
- Improve member autocompletion (#16504) (Thanks @MartinGC94!)
- Prioritize ValidateSet completions over Enums for parameters (#15257) (Thanks @MartinGC94!)
- Add type inference support for generic methods with type parameters (#16951) (Thanks @MartinGC94!)
- Improve type inference and completions (#16963) (Thanks @MartinGC94!)
- Allows methods to be shown in completion results for
ForEach-Object -MemberName - Prevents completion on expressions that return void like
([void]("")) - Allows non-default Class constructors to show up when class completion is based on the AST
- Allows methods to be shown in completion results for
- Improve type inference for
$_(#17716) (Thanks @MartinGC94!) - Fix type inference for ICollection (#17752) (Thanks @MartinGC94!)
- Prevent braces from being removed when completing variables (#17751) (Thanks @MartinGC94!)
- Add completion for index expressions for dictionaries (#17619) (Thanks @MartinGC94!)
- Fix type completion for attribute tokens (#17484) (Thanks @MartinGC94!)
- Improve dynamic parameter tab completion (#17661) (Thanks @MartinGC94!)
- Avoid binding positional parameters when completing parameter in front of value (#17693) (Thanks @MartinGC94!)
Improved error handling
- Set
$?correctly for command expression with redirections (#16046) - Fix a casting error when using
$PSNativeCommandUseErrorActionPreference(#15993) - Make the native command error handling optionally honor
ErrorActionPreference(#15897) - Specify the executable path as
TargetObjectfor non-zero exit code ErrorRecord (#16108) (Thanks @rkeithhill!)
Session and remoting improvements
- Add
-Optionsto the PSRP over SSH commands to allow passing OpenSSH options directly (#12802) (Thanks @BrannenGH!) - Add
-ConfigurationFileparameter topwshto allow starting a new process with the session configuration defined in a.psscfile (#17447) - Add support for using
New-PSSessionConfigurationFileon non-Windows platforms (#17447)
Updated cmdlets
- Add
-HttpVersionparameter to web cmdlets (#15853) (Thanks @hayhay27!) - Add support to web cmdlets for open-ended input tags (#16193) (Thanks @farmerau!)
- Fix
ConvertTo-Json -Depthto allow 100 at maximum (#16197) (Thanks @KevRitchie!) - Improve variable handling when calling
Invoke-Commandwith the$Using:expression (#16113) (Thanks @dwtaber!) - Add
-StrictModetoInvoke-Commandto allow specifying strict mode when invoking command locally (#16545) (Thanks @Thomas-Yu!) - Add
cleanblock to script block as a peer tobegin,process, andendto allow easy resource cleanup (#15177) - Add
-Amendedswitch toGet-CimClasscmdlet (#17477) (Thanks @iSazonov) - Changed
ConvertFrom-Json -AsHashtableto use ordered hashtable (#17405) - Removed ANSI escape sequences in strings before sending to
Out-GridView(#17664) - Added the Milliseconds parameter to
New-TimeSpan(#17621) (Thanks @NoMoreFood!) - Show optional parameters when displaying method definitions and overloads (#13799) (Thanks @eugenesmlv!)
- Allow commands to still be executed even if the current working directory no longer exists (#17579)
- Add support for HTTPS with
Set-AuthenticodeSignature -TimeStampServer(#16134) (Thanks @Ryan-Hutchison-USAF!) - Render decimal numbers in a table using current culture (#17650)
- Add type accelerator ordered for OrderedDictionary (#17804) (Thanks @fflaten!)
- Add
find.exeto legacy argument binding behavior for Windows (#17715) - Add
-NoProfileLoadTimeswitch to pwsh (#17535) (Thanks @rkeithhill!)
For a complete list of changes, see the Change Log in the GitHub repository.
Experimental Features
In PowerShell 7.3, following experimental features became mainstream:
PSAnsiRenderingFileInfo- This feature adds the$PSStyle.FileInfomember and enables coloring of specific file types.PSCleanBlock- Addscleanblock to script block as a peer tobegin,process, andendto allow easy resource cleanup.PSAMSIMethodInvocationLogging- Extends the data sent to AMSI for inspection to include all invocations of .NET method members.PSNativeCommandArgumentPassing - PowerShell now uses the ArgumentList property of the StartProcessInfo object rather than the old mechanism of reconstructing a string when invoking a native executable.
PowerShell 7.3.1 adds
sqlcmd.exeto the list of native commands in Windows that use theLegacystyle of argument passing.PSExec- Adds the newSwitch-Processcmdlet (aliasexec) to provideexeccompatibility for non-Windows systems.PowerShell 7.3.1 changed the
execalias to a function that wrapsSwitch-Process. The function allows you to pass parameters to the native command that might have erroneously bound to the WithCommand parameter.
PowerShell 7.3 introduces the following experimental features:
- PSNativeCommandErrorActionPreference - Adds the
$PSNativeCommandUseErrorActionPreferencevariable to enable errors produced by native commands to be PowerShell errors.
PowerShell 7.3 removed the following experimental features:
PSNativePSPathResolutionexperimental feature is no longer supported.PSStrictModeAssignmentexperimental feature is no longer supported.
For more information about the Experimental Features, see Using Experimental Features.