Preview 5 of Microsoft PowerShell 7 was released last night, which means that the final version is getting closer.
Although there is only one more preview left before a Release Candidate in time for Christmas (and the final release of .NET Core 3.1), the gang has continued to load the cross-platform command line shell with new features.
Steve Lee, the principal software engineering manager behind the project, listed some of the most notable adjustments, starting with Pipeline Chain Operators.
While PowerShell has had
if to perform conditional execution, it is a bit awkward compared to other shells. To that end,
|| have been added as pipeline operators to chain functions or cmdlets based on the success or failure of the left command.
else statements have taken an additional blow with the new coalescing operator
?? that will return the value of a declaration if it is not null, or something else if so.
Other improvements include tab completion for variable assignment and format improvements
Format-Hex . Hidden in the notes is also the return of
Get-HotFix that will please administrators who use Windows. The cmdlet queries the system for a list of installed patches and has been removed due to the dependency of PowerShell Core 6 on .NET Core 2.x.
However, with the arrival of .NET Core 3.0 and the return of
System.Management namespace, PowerShell 7 users (on Windows) can once again admire the large number of patches In their systems.
Re-enabling that cmdlet is useful as the gang continues to make the original PowerShell for redundant Windows only.
For many, chain operators and handling improvements of
$ null this time will be worth the price of admission, although additional tools to deal with the stripes of the red text vomited to users When things go wrong you are also welcome.
Lee joked that the final preview of November would have "some more features" before things get blocked for the Release Candidate in December and General Availability in January. ®
Your guide to being truly data driven with unmatched data analysis performance