| title | What's New in PowerShell 7.6 |
|---|---|
| description | New features and changes released in PowerShell 7.6 |
| ms.date | 03/26/2025 |
PowerShell 7.6-preview.4 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 in the GitHub repository.
PowerShell 7.6-preview.4 includes the following updated modules:
- Microsoft.PowerShell.PSResourceGet v1.1.0
- PSReadLine v2.3.6
- Microsoft.PowerShell.ThreadJob v2.2.0
- ThreadJob v2.1.0
The ThreadJob was renamed to Microsoft.PowerShell.ThreadJob module. There is no difference in the functionality of the module. To ensure backward compatibility for scripts that use the old name, the ThreadJob v2.1.0 module is a proxy module that points to the Microsoft.PowerShell.ThreadJob v2.2.0.
- Fix
WildcardPattern.Escapeto escape lone backticks correctly (#25211) (Thanks @ArmaanMcleod!) - Convert
-ChildPathparameter tostring[]forJoin-Pathcmdlet (#24677) (Thanks @ArmaanMcleod!) - Remove trailing space from event source name (#24192) (Thanks @MartinGC94!)
- Update Named and Statement block type inference to not consider AssignmentStatements and Increment/decrement operators as part of their output (#21137) (Thanks @MartinGC94!)
- Add
-PropertyTypeargument completer forNew-ItemProperty(#21117) (Thanks @ArmaanMcleod!) - Add completion single/double quote support for
-Nounparameter forGet-Command(#24977) (Thanks @ArmaanMcleod!) - Add completion single/double quote support for
-PSEditionparameter forGet-Module(#24971) (Thanks @ArmaanMcleod!) - Convert InvalidCommandNameCharacters in AnalysisCache to
SearchValues<char>for more efficient char searching (#24880) (Thanks @ArmaanMcleod!) - Convert s_charactersRequiringQuotes in Completion Completers to
SearchValues<char>for more efficient char searching (#24879) (Thanks @ArmaanMcleod!) - Update
IndexOfAny()calls with invalid path/filename toSearchValues<char>for more efficient char searching ([#24896][24896]) (Thanks @ArmaanMcleod!) - Replace
char[]array inCompletionRequiresQuoteswith cachedSearchValues<char>(#24907) (Thanks @ArmaanMcleod!) - Add quote handling in
Verb,StrictModeVersion,ScopeandPropertyTypeArgument Completers with single helper method (#24839) (Thanks @ArmaanMcleod!) - Fix share completion with provider and spaces (#19440) (Thanks @MartinGC94!)
- Improve variable type inference (#19830) (Thanks @MartinGC94!)
- Add tooltips for hashtable key completions (#17864) (Thanks @MartinGC94!)
- Fix type inference of parameters in classic functions (#25172) (Thanks @MartinGC94!)
- Improve assignment type inference (#21143) (Thanks @MartinGC94!)
- Exclude OutVariable assignments within the same
CommandAstwhen inferring variables (#25224) (Thanks @MartinGC94!) - Fix parameter completion when script requirements fail (#17687) (Thanks @MartinGC94!)
- Improve the completion for attribute arguments (#25129) (Thanks @MartinGC94!)
- Fix completion that relies on pseudobinding in script blocks (#25122) (Thanks @MartinGC94!)
- Don't complete duplicate command names (#21113) (Thanks @MartinGC94!)
- Add completion for variables assigned by command redirection (#25104) (Thanks @MartinGC94!)
- Fix
TypeName.GetReflectionType()to work when theTypeNameinstance represents a generic type definition within aGenericTypeName(#24985) - Update variable/property assignment completion so it can fallback to type inference (#21134) (Thanks @MartinGC94!)
- Handle type inference for redirected commands (#21131) (Thanks @MartinGC94!)
- Use
Get-Helpapproach to findabout_*.help.txtfiles with correct locale for completions (#24194) (Thanks @MartinGC94!) - Fix completion of variables assigned inside Do loops (#25076) (Thanks @MartinGC94!)
- Fix completion of provider paths when a path returns itself instead of its children (#24755) (Thanks @MartinGC94!)
- Enable completion of scoped variables without specifying scope (#20340) (Thanks @MartinGC94!)
- Fix issue with incomplete results when completing paths with wildcards in non-filesystem providers (#24757) (Thanks @MartinGC94!)
- Add
-ExcludeModuleparameter toGet-Command(#18955) (Thanks @MartinGC94!) - Return correct FileName property for
Get-Itemwhen listing alternate data streams (#18019) (Thanks @kilasuit!) - Fix
Get-ItemPropertyto report non-terminating error for cast exception (#21115) (Thanks @ArmaanMcleod!) - Fix a bug in how q handles XmlNode object (#24669) (Thanks @brendandburns!)
- Error when
New-Item -Forceis passed an invalid directory name (#24936) (Thanks @kborowinski!) - Allow
Start-Transcriptto use$Transcriptwhich is aPSObjectwrapped string to specify the transcript path (#24963) (Thanks @kborowinski!) - Improve
Start-Process -Waitpolling efficiency (#24711) (Thanks @jborean93!) - Add completion of modules by their shortname (#20330) (Thanks @MartinGC94!)
- Added the AIShell module to telemetry collection list (#24747)
- Added helper in
EnumSingleTypeConverterto get enum names as array (#17785) (Thanks @fflaten!) - Update DnsNameList for X509Certificate2 to use
X509SubjectAlternativeNameExtension.EnumerateDnsNames()Method (#24714) (Thanks @ArmaanMcleod!) - Stringify ErrorRecord with empty exception message to empty string (#24949) (Thanks @MatejKafka!)
- Add
PipelineStopTokentoCmdletwhich will be signaled when the pipeline is stopping (#24620) (Thanks @jborean93!) - Fallback to AppLocker after
WldpCanExecuteFile(#24912) - Move .NET method invocation logging to after the needed type conversion is done for method arguments (#25022)
- Fix infinite loop in variable type inference (#25206) (Thanks @MartinGC94!)
- Remove the old fuzzy suggestion and fix the local script file name suggestion (#25177)
- Make
SystemPolicypublic APIs visible but non-op on Unix platforms so that they can be included inPowerShellStandard.Library(#25051) - Set standard handles explicitly when starting a process with
-NoNewWindow(#25061) - Fix tooltip for variable expansion and include desc (#25112) (Thanks @jborean93!)
- Allow empty prefix string in 'Import-Module -Prefix' to override default prefix in manifest (#20409) (Thanks @MartinGC94!)
- Use script filepath when completing relative paths for using statements (#20017) (Thanks @MartinGC94!)
- Allow DSC parsing through OS architecture translation layers (#24852) (Thanks @bdeb1337!)
The following experimental features are included in PowerShell 7.6-preview.3:
- PSNativeWindowsTildeExpansion - Add tilde expansion for Windows-native executables
- PSRedirectToVariable - Allow redirecting to a variable
- PSSerializeJSONLongEnumAsNumber -
ConvertTo-Jsonnow treats large enums as numbers