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.6-preview.5 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.
Updated modules
PowerShell 7.6-preview.5 includes the following updated modules:
- Microsoft.PowerShell.PSResourceGet v1.1.0
- PSReadLine v2.4.4-beta4
- 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.
Breaking Changes
- 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!)
Tab completion improvements
- Use parameter
HelpMessagefor tool tip in parameter completion (#25108) (Thanks @jborean93!) - Remove duplicate modules from completion results (#25538) (Thanks @MartinGC94!)
- Add completion for variables assigned in
ArrayLiteralAstandParenExpressionAst(#25303) (Thanks @MartinGC94!) - Fix tab completion for env/function variables (#25346) (Thanks @jborean93!)
- 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!)
Cmdlet improvements
- Fix Out-GridView by replacing use of obsolete BinaryFormatter with custom implementation (#25497) (Thanks @mawosoft!)
- Improve verbose and debug logging level messaging in web cmdlets (#25510) (Thanks @JustinGrote!)
- Improve debug logging of Web cmdlet request and response (#25479) (Thanks @JustinGrote!)
- Add the parameter
Register-ArgumentCompleter -NativeFallbackto support registering a cover-all completer for native commands (#25230) - Treat
-Targetas literal inNew-Item(#25186) (Thanks @GameMicrowave!) - Update PATH environment variable for package manager executable on Windows (#25847)
- Update
Get-Serviceto ignore common errors when retrieving non-critical properties for a service (#24245) (Thanks @jborean93!) - Add single/double quote support for
Join-StringArgument Completer (#25283) (Thanks @ArmaanMcleod!) - Remove
IsScreenReaderActive()check fromConsoleHost(#26118) - Improve the
$usingexpression support inInvoke-Command(#24025) (Thanks @jborean93!) - Change the default feedback provider timeout from 300ms to 1000ms (#25910)
- Add support for thousands separators in
[bigint]casting (#25396) (Thanks @AbishekPonmudi!) - Add
MethodInvocationtrace for overload tracing (#21320) (Thanks @jborean93!) - Fix
ConvertFrom-Jsonto ignore comments inside array literals (#14553) (#26050) (Thanks @MatejKafka!) - Fix
-Debugto not trigger theShouldProcessprompt (#26081) - Fix
Write-Hostto respectOutputRendering = PlainText(#21188) - Fix debug tracing error with magic extents (#25726) (Thanks @jborean93!)
- Fix quoting in completion if the path includes a double quote character (#25631) (Thanks @MartinGC94!)
- Fix the common parameter
-ProgressActionfor advanced functions (#24591) (Thanks @cmkb3!) - Fix the
NullReferenceExceptionwhen writing progress records to console from multiple threads (#25440) (Thanks @kborowinski!) - Use absolute path in
FileSystemProvider.CreateDirectory(#24615) (Thanks @Tadas!) - Make inherited protected internal instance members accessible in PowerShell class scope (#25245) (Thanks @mawosoft!)
- Add internal methods to check Preferences (#25514) (Thanks @iSazonov!)
- 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!)
Engine improvements
- Update the PSDiagnostics module to manage the PowerShellCore provider in PowerShell 7 (#25590)
- Allow opt-out of the named-pipe listener using the environment variable
POWERSHELL_DIAGNOSTICS_OPTOUT(#26086) - Ensure that socket timeouts are set only during the token validation (#26066)
- Fix
stderroutput of console host to respectNO_COLOR(#24391) - Update PSRP protocol to deprecate session key exchange between newer client and server (#25774)
- Fix the
sshPATH check inSSHConnectionInfowhen the default Runspace is not available (#25780) (Thanks @jborean93!) - Adding hex format for native command exit codes (#21067) (Thanks @sba923!)
- Fix infinite loop crash in variable type inference (#25696) (Thanks @MartinGC94!)
- Add
PSForEachandPSWhereas aliases for the PowerShell intrinsic methodsWhereandForeach(#25511) (Thanks @powercode!) - 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!)
- Use script filepath when completing relative paths for using statements (#20017) (Thanks @MartinGC94!)
- Allow DSC parsing through OS architecture translation layers (#24852) (Thanks @bdeb1337!)
Experimental features
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