Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
PowerShell 7.7.0-preview.4 includes the following features, updates, and breaking changes. PowerShell 7.7.0-preview.4 is built on the .NET 11.0.100-preview.6 runtime.
For a complete list of changes, see the CHANGELOG in the GitHub repository.
Updated modules
PowerShell 7.7 includes the following updated modules:
- Microsoft.PowerShell.PSResourceGet v1.3.0-preview1
- PSReadLine v2.4.5
Breaking Changes
New-Guidnow generates Version 7 (time-sortable) UUIDs by default instead of Version 4 (random). The output format is unchanged. Scripts that depend on fully random GUIDs should use[guid]::NewGuid()directly. (#27033)- Add
ValidateNotNullOrEmptyattribute to the-PropertyofFormat-Table,Format-List, andFormat-Custom(#26552) - Use ArgumentException.ThrowIfNullOrEmpty for not-null-not-empty argument validation.
(#26668)
- The exception thrown changes to
System.ArgumentExceptionfromSystem.Management.Automation.PSArgumentNullException.
- The exception thrown changes to
- Correct handling of explicit
-[<Operator>]:$falseparameter values inWhere-Object(#26485) (Thanks @yotsuda!)
Tab completion improvements
- Add tab completion for
$PSBoundParameters.Keysswitch cases and access patterns (#26483) (Thanks @yotsuda!) - Fix the regression in tab completing positional parameters (#27857)
Cmdlet improvements
- Improve output file path determination for
Invoke-WebRequest(#27872) - Improve
Authorizationheader default and redirect behavior (#27873) - Add
New-TemporaryDirectorycmdlet (#27549) (Thanks @KirtiRamchandani!) - Change
New-Guidto generate UUID v7 by default (#27033) (Thanks @SufficientDaikon!) - Handle empty-string and null-value results returned from custom argument completer more properly (#27398)
- Add missing resource strings for
Get-WinEvent(#27397) (Thanks @MartinGC94!) - Improve
Get-WinEvent -ListLogexception handling (#27395) (Thanks @MartinGC94!) - Update
MaxVisitCountandMaxHashtableKeyCountifVisitorSafeValueContextindicatesSkipLimitCheckis true forImport-PowerShellDataFile - Correct handling of explicit
-<SwitchParameter>:$falseparameter values for the following cmdlets:ConvertFrom-Csv,ConvertTo-Csv,Export-Csv, andImport-Csv(#26719) (Thanks @yotsuda!)Get-Random(#26457) (Thanks @yotsuda!)Get-SecureRandom(#26460) (Thanks @yotsuda!)Get-TimeZone(#26463) (Thanks @yotsuda!)Get-Uptime(#26141) (Thanks @logiclrd!)New-Guid(#26140) (Thanks @logiclrd!)New-PSSession(#26469) (Thanks @yotsuda!)Split-Path(#26474) (Thanks @yotsuda!)Test-Connection(#26479) (Thanks @yotsuda!)Where-Object(#26485) (Thanks @yotsuda!)
- Add
-ExcludePropertyparameter toFormat-*cmdlets (#26514) (Thanks @yotsuda!) - Add
-Extensionparameter toJoin-Pathcmdlet (#26482) (Thanks @yotsuda!) - Make
Export-Csv-Appendand-NoHeadermutually exclusive (#26472) (Thanks @yotsuda!) - Mark
-NoTypeInformationas obsolete no-op and evaluate-IncludeTypeInformationon by value on Csv cmdlets (#26719) (Thanks @yotsuda!) - Add
SubjectAlternativeNameproperty to theSignatureobject returned fromGet-AuthenticodeSignature(#26252) - Add property and event for debug attach (#25788) (Thanks @jborean93!)
- Add
$PSApplicationOutputEncodingvariable (#21219) (Thanks @jborean93!) - Add
ToRegexmethod toWildcardPatternclass (#26515) (Thanks @yotsuda!) - Update PowerShell Profile DSC resource manifests to allow null for content (#26929)
- DSC v3 resource for PowerShell Profile (#26157)
- Dynamically evaluate width of
LastWriteTimefor formatting output on Unix (#24624) (Thanks @MathiasMagnus!) - Fix formatting to properly handle the
ResetVT sequences that appear in the middle of a string (#26424) - Fix
Invoke-RestMethodto support read-only files in multipart form data (#26454) (Thanks @yotsuda!) - Fix memory leak in
GetFileShares(#25896) (Thanks @xtqqczze!) - Fix NOTES section formatting in comment-based help (#26512) (Thanks @yotsuda!)
- Fix
Test-Jsonfalse positive errors when usingoneOforanyOfin schema (#26618) (Thanks @yotsuda!) - Fix the CLR internal error and null ref exception when running
Show-Commandwith PowerShell API (#26669) - Handle null reference exception in
CsvCommands.cs:ConvertPSObjectToCSV(#26144) (Thanks @mikkas456!) - Improve
ValidateLengtherror message consistency and refactor validation tests (#25806) (Thanks @jorgeasaurus!) - Support TargetObject position in
ParserErrors(#26649) (Thanks @jborean93!) - Add verbose message to
Get-Servicewhen properties cannot be returned (#27109) (Thanks @reabr!) - Fix
Remove-Itemconfirmation message to use provider path instead (#27123) (Thanks @scuzqy!) - PSStyle: validate background index against
BackgroundColorMap(#27106) (Thanks @cuiweixie!)
Engine improvements
- Call
CodeGeneration.EscapeSingleQuotedStringContentAPI in SyncCurrentLocationHandler (#27874) - Improve PowerShell Remoting Argument Validation (#27870)
- Improve validation for data fragments for PSRP frame headers (#27871)
- Add the xsd validation back for CIM cmdlets (#27869)
- Fix PATH caching in CommandDiscovery code (#27809)
- Fix
FileOnlyEntrycrashing on older versions of Windows (#27880) - Add support for new WLDP setting
EnableFileOnlyEntry(#26752) - Fix the dot-sourcing behavior of
pwsh -filefor advanced-function scripts (#27727) - Fix progress bar rendering with double-width Unicode characters (#26185) (Thanks @yotsuda!)
- Update PowerShell telemetry to respect the diagnostics and feedback setting on Windows (#27328)
- Fix up default value for parameters with the
inmodifier (#26785) (Thanks @jborean93!) - Fix
WSManInstanceCOM interface withResourceURI(#26692) (Thanks @jborean93!) - Refactor the module path construction code to make it more robust and easier to maintain (#26565)
- Fix checks for local user config file paths (#26269)
- Delay update notification for one week to ensure all packages become available (#27095)
- Disable AMSI content logging in release (#26235) (Thanks @xtqqczze!)
- Add property and event for debug attach (#25788) (Thanks @jborean93!)
- Enable usage in AppContainers (#27266)
Experimental features
PowerShell 7.7 includes the following experimental features.
- PSLoadAssemblyFromNativeCode - Load assemblies from native code
- PSSerializeJSONLongEnumAsNumber -
ConvertTo-Jsonnow treats large enums as numbers - PSProfileDSCResource - Add DSC v3 resource for PowerShell Profiles
PowerShell