PowerShell Preview v7.7.0-preview.1 release

Three days ago, the latest PowerShell Preview version was released, following the previous Preview version, 7.6 (which is now the new LTS). In this short blog post, I will highlight some changes and how to install v7.7.0-preview.1.

What are Preview versions?

Preview release – A preview release is a version of PowerShell that’s currently in development. Preview releases can contain breaking changes, bug fixes, new features, and experiments. Preview releases might contain bugs and might not be stable. For that reason, you shouldn’t use them in production environments. Preview versions aren’t officially supported. They allow you to test out new features and provide feedback. Your feedback is important and can influence the features that get released.PowerShell 7.7-preview.1 is the current preview release.”

Source: https://learn.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.6

What’s new in this version?

One of the bigger things, as mentioned earlier here, is that there is no MSI installer available for Windows anymore. This installation method has been replaced by MSIX, which has its good points but also limits things that were possible before, like remoting and running things as SYSTEM.

But these are the important ones:

Breaking changes

  • Add ValidateNotNullOrEmpty attribute to the -Property of Format-Table/List/Custom (#26552)
  • Fix to use accurate message for validating a string argument is not null and not an empty string (#26668)
  • Correct handling of explicit -[Operator]:$false parameter values in Where-Object (#26485) (Thanks @yotsuda!)

Engine Updates and Fixes

  • Update MaxVisitCount and MaxHashtableKeyCount if VisitorSafeValueContext indicates SkipLimitCheck is true
    (#27308)
  • Enable usage in AppContainers (#27305)
  • Delay update notification for one week to ensure all packages become available (#27095)
  • Fix up default value for parameters with the in modifier (#26785) (Thanks @jborean93!)
  • Fix WSManInstance COM interface with ResourceURI (#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)

General Cmdlet Updates and Fixes

  • Add verbose message to Get-Service when properties cannot be returned (#27109) (Thanks @reabr!)
  • Fix Remove-Item confirmation message to use provider path instead (#27123) (Thanks @scuzqy!)
  • PSStyle: validate background index against BackgroundColorMap (#27106) (Thanks @cuiweixie!)
  • Update PowerShell Profile DSC resource manifests to allow null for content (#26929)
  • Add SubjectAlternativeName property to the Signature object returned from Get-AuthenticodeSignature (#26252)
  • Mark -NoTypeInformation as obsolete no-op and evaluate -IncludeTypeInformation on by value on Csv cmdlets (#26719) (Thanks @yotsuda!)
  • Support TargetObject position in ParserErrors (#26649) (Thanks @jborean93!)
  • Fix the CLR internal error and null ref exception when running show-command with PowerShell API (#26669)
  • Fix Test-Json false positive errors when using oneOf or anyOf in schema (#26618) (Thanks @yotsuda!)
  • Add ToRegex method to WildcardPattern class (#26515) (Thanks @yotsuda!)
  • Add -ExcludeProperty parameter to Format-* cmdlets (#26514) (Thanks @yotsuda!)
  • Fix NOTES section formatting in comment-based help (#26512) (Thanks @yotsuda!)
  • Disable AMSI content logging in release (#26235) (Thanks @xtqqczze!)
  • Add tab completion for $PSBoundParameters.Keys switch cases and access patterns (#26483) (Thanks @yotsuda!)
  • Fix formatting to properly handle the Reset VT sequences that appear in the middle of a string (#26424)
  • Add -Extension parameter to Join-Path cmdlet (#26482) (Thanks @yotsuda!)
  • Make Export-Csv -Append and -NoHeader mutually exclusive (#26472) (Thanks @yotsuda!)
  • Respect -Qualifier/-NoQualifier/-Leaf/-IsAbsolute:$false in Split-Path (#26474) (Thanks @yotsuda!)
  • Respect -UseWindowsPowerShell:$false in New-PSSession (#26469) (Thanks @yotsuda!)
  • Respect -Repeat/-MtuSize/-Traceroute:$false in Test-Connection (#26479) (Thanks @yotsuda!)
  • Fix Invoke-RestMethod to support read-only files in multipart form data (#26454) (Thanks @yotsuda!)
  • Respect -ListAvailable:$false in Get-TimeZone (#26463) (Thanks @yotsuda!)
  • Respect -Shuffle:$false in Get-SecureRandom (#26460) (Thanks @yotsuda!)
  • Respect -Shuffle:$false in Get-Random (#26457) (Thanks @yotsuda!)
  • DSC v3 resource for Powershell Profile (#26157)
  • Make the experimental feature PSFeedbackProvider stable (#26343)
  • Make some experimental features stable (#26348)
  • Add PSApplicationOutputEncoding variable (#21219) (Thanks @jborean93!)
  • Dynamically evaluate width of LastWriteTime for formatting output on Unix (#24624) (Thanks @MathiasMagnus!)
  • Handle null reference exception in CsvCommands.cs: ConvertPSObjectToCSV (#26144) (Thanks @mikkas456!)
  • Improve ValidateLength error message consistency and refactor validation tests (#25806) (Thanks @jorgeasaurus!)
  • Correct handling of explicit -Since:$false parameter value in Get-Uptime (#26141) (Thanks @logiclrd!)
  • Add property and event for debug attach (#25788) (Thanks @jborean93!)
  • Fix memory leak in GetFileShares (#25896) (Thanks @xtqqczze!)
  • Correct handling of explicit -Empty:$false parameter value in New-Guid (#26140) (Thanks @logiclrd!)

Code Cleanup

We thank the following contributors!

@xtqqczze@yotsuda@ThioJoe@rwp0@amritanand-py

  • Fix IDisposable implementation in sealed classes (#26215) (Thanks @xtqqczze!)
  • Enable CA1852: Seal internal types (#25890) (Thanks @xtqqczze!)
  • Remove obsolete CA2006 rule suppression (#25939) (Thanks @xtqqczze!)
  • Use consistent indentation in the file HelpersCommon.psm1 (#26608)
  • Centralize ExcludeProperty filter application in ViewGenerator base class (#26574) (Thanks @yotsuda!)
  • Refactor IsComputerNameValid character validation (#26274) (Thanks @xtqqczze!)
  • Remove obsolete test/docker/networktest directory (#26388)
  • Avoid regex for exact word matching in DscClassCache (#26306) (Thanks @xtqqczze!)
  • Enable analyzers: Use char overload (#26301) (Thanks @xtqqczze!)
  • Enable CA1200: Avoid using cref tags with a prefix (#26298) (Thanks @xtqqczze!)
  • Remove unused timeout variable from RemoteHyperVTests class (#26297) (Thanks @xtqqczze!)
  • Enable CA2022: Avoid inexact read with Stream.Read (#25814) (Thanks @xtqqczze!)
  • Fix a few simple typos in comments and string outputs (#25805) (Thanks @ThioJoe!)
  • Remove unused Azure Devops windows CI workflows (#26245)
  • Fix CA1837: Use Environment.ProcessId (#26242) (Thanks @xtqqczze!)
  • Enable IDE0080: RemoveConfusingSuppressionForIsExpression (#26206) (Thanks @xtqqczze!)
  • Remove redundant CharSet from StructLayout attributes. Part 1 (#26216) (Thanks @xtqqczze!)
  • Fix IDE0083: UseNotPattern (#26213) (Thanks @xtqqczze!)
  • Fix IDE0049 for string in System.Management.Automation (#25921) (Thanks @xtqqczze!)
  • Fix IDE0049 for object in System.Management.Automation. Part 1 (#25923) (Thanks @xtqqczze!)
  • Replace stackallocs with collection expressions (#25803) (Thanks @xtqqczze!)
  • Capitalize Windows in PSNativeWindowsTildeExpansion experimental feature description (#25266) (Thanks @rwp0!)
  • Fix SA1028: Code should not contain trailing whitespace. Part 1. (#26203) (Thanks @xtqqczze!)
  • Fix IDE0083: UseNotPattern (#26209) (Thanks @xtqqczze!)
  • Fix CA1852: Seal internal types. Part 1 (#26205) (Thanks @xtqqczze!)
  • Enable IDE0019: InlineAsTypeCheck (#25920) (Thanks @xtqqczze!)
  • Fix mismatched indentation in .config/suppress.json (#26192) (Thanks @xtqqczze!)
  • Replace custom method with File.ReadAllText() in ScriptAnalysis.cs (#26060) (Thanks @amritanand-py!)
  • Avoid possible multiple enumerations in ImportModuleCommand.IsPs1xmlFileHelper_IsPresentInEntries (#26104) (Thanks @xtqqczze!)
  • Enable SA1206: Declaration keywords should follow order (#24973) (Thanks @xtqqczze!)
  • Disable IDE0049: PreferBuiltInOrFrameworkType (#26094) (Thanks @xtqqczze!)
  • Enable CA1853: Unnecessary call to Dictionary.ContainsKey(key) (#26106) (Thanks @xtqqczze!)
  • Enable CA1860: Avoid using Enumerable.Any() extension method (#26109) (Thanks @xtqqczze!)
  • Enable CA1858: Use StartsWith instead of IndexOf (#26107) (Thanks @xtqqczze!)
  • Add CodeQL suppressions for NativeCommandProcessor (#26729)

Tools

  • Add GitOps policy to auto-label backport candidates when CL-BuildPackaging is added (#26881)
  • Add Pester CI Analysis Skill (#26806)
  • Delete unused winget release script (#26683)
  • Improve error message from Start-NativeExecution (#26500) (Thanks @logiclrd!)
  • Add default CODEOWNERS entry for maintainers (#26660)
  • Add Attack Surface Analyzer Script (#26379)
  • Add merge conflict marker detection to linux-ci workflow and refactor existing actions to use reusable get-changed-files action (#26350)
  • Add reusable get-changed-files action and refactor existing actions (#26355)
  • Refactor analyze job to reusable workflow and enable on Windows CI (#26322)
  • Create github copilot setup workflow (#26285)
  • Update dependabot.yml to monitor release/* branches (#26251)

Tests

  • Fix the PSNativeCommandArgumentPassing test (#27057)
  • Fix Import-Module.Tests.ps1 to handle Arm32 platform (#26862)
  • Add comprehensive PowerShell class tests for ConvertTo-Json (#26769) (Thanks @yotsuda!)
  • Add comprehensive PSCustomObject tests for ConvertTo-Json (#26743) (Thanks @yotsuda!)
  • Add GitHub Actions annotations for Pester test failures (#26789)
  • Add comprehensive depth and multilevel composition tests for ConvertTo-Json (#26744) (Thanks @yotsuda!)
  • Add comprehensive array and dictionary tests for ConvertTo-Json (#26742) (Thanks @yotsuda!)
  • Add comprehensive scalar type tests for ConvertTo-Json (#26736) (Thanks @yotsuda!)
  • Fix the fuzzy test (#26402)
  • Add Fuzz Tests (#26384)
  • Fix merge conflict checker for empty file lists and filter *.cs files (#26365)
  • Fix linux_packaging job being skipped when only packaging files change (#26315)
  • Use [initialsessionstate] type accelerator (#25912) (Thanks @xtqqczze!)
  • Check for GetWindowPlacement success (#26122) (Thanks @xtqqczze!)

Build and Packaging Improvements

We thank the following contributors!

@powercode@kasperk81@xtqqczze

  • Update branch for release (#27291)
  • Remove package verification from the notice pipeline (#27289)
  • Remove MSI from publishing pipeline (#27213)
  • Externalize findMissingNotices target framework selection with ordered Windows fallback (#27269)
  • Fix the package pipeline by adding in PDP-Media directory (#27254)
  • Bump actions/checkout from 4 to 6.0.2 (#27206)
  • Build, package, and create VPack for the PowerShell-LTS store package within the same msixbundle-vpack pipeline (#150) (#27209)
  • Pin ready-to-merge.yml reusable workflow to commit SHA (#27204)
  • Change the display name of PowerShell-LTS MSIX package to “PowerShell LTS” (#27203)
  • [StepSecurity] ci: Harden GitHub Actions (#27201)
  • [StepSecurity] ci: Harden GitHub Actions (#27202)
  • Redo windows image fix to use latest image (#27198)
  • Separate Store Package Creation, Skip Polling for Store Publish, Clean up PDP-Media (#27024)
  • Revert “Fetch latest ICU release version dynamically” (#27127)
  • Update package references and move to .NET SDK 11.0-preview.2 (#27117)
  • Add comment-based help documentation to build.psm1 functions (#27122) (Thanks @powercode!)
  • Bump github/codeql-action from 3.30.3 to 4.35.1 (#27120)
  • Select New MSIX Package Name (#27096)
  • Separate Official and NonOfficial templates for ADO pipelines (#26897)
  • Update the PhoneProductId to be the official LTS id used by Store (#27077)
  • release-upload-buildinfo: replace version-comparison channel gating with metadata flags (#27074)
  • Update build to create two msix’s and msixbundles for LTS and Stable (#27056)
  • Update metadata.json for the v7.6.0 release (#27054)
  • Move _GetDependencies MSBuild target from dynamic generation in build.psm1 into Microsoft.PowerShell.SDK.csproj (#27052)
  • Fix PMC repo URL for RHEL10 (#27059)
  • Create Linux LTS deb/rpm packages for LTS releases (#27049)
  • Create LTS pkg and non-LTS pkg for macOS for LTS releases (#27039)
  • Fix the container image for vPack, MSIX vPack and Package pipelines (#27015)
  • Update Microsoft.PowerShell.PSResourceGet version to 1.2.0 (#27003)
  • Fix ConvertFrom-ClearlyDefinedCoordinates to handle API object coordinates (#26893)
  • Bump actions/upload-artifact from 4 to 7 (#26914)
  • Bump actions/dependency-review-action from 4.7.3 to 4.9.0 (#26938)
  • Hardcode Official templates (#26928)
  • Add PMC packages for debian13 and rhel10 (#26912)
  • Split TPN manifest and Component Governance manifest (#26891)
  • Add version in description and pass store task on failure (#26885)
  • Correct the package name for .deb and .rpm packages (#26877)
  • Fix a preview detection test for the packaging script (#26882)
  • Exclude .exe packages from publishing to GitHub (#26859)
  • Update metadata.json for v7.6.0-rc.1 (#26856)
  • Fetch latest ICU release version dynamically (#26827) (Thanks @kasperk81!)
  • Update LangVersion to preview (#26214) (Thanks @xtqqczze!)
  • Update to .NET 11 SDK and update dependencies (#26783)
  • Update outdated package references (#26771)
  • Create es-metadata (#26759)
  • Add policy to restrict the Approved-LowRisk label (#26728)
  • Move PowerShell build to depend on .NET SDK 10.0.102 (#26697)
  • Update metadata.json to update the Latest attribute with a better name (#26380)
  • Update outdated package references (#26656)
  • Bring release changes from the v7.6.0-preview.6 release branch (#26627)
  • Update build to use .NET SDK 10.0.100 (#26448)
  • Update the macos package name for preview releases to match the previous pattern (#26429)
  • Fix condition syntax for StoreBroker package tasks in MSIX pipeline (#26427)
  • Fix template path for rebuild branch check in package.yml (#26425)
  • Update the WCF packages to the latest version that is compatible with v4.10.3 (#26406)
  • Add rebuild branch support with conditional MSIX signing (#26415)
  • Optimize/split windows package signing (#26403)
  • Improve ADO package build and validation across platforms (#26398)
  • Update outdated test package references (#26368)
  • Delete this way of collecting feedback (#26364)
  • Update the Microsoft.PowerShell.Native package version (#26347)
  • Add log grouping to build.psm1 for collapsible GitHub Actions logs (#26326)
  • Bump actions/setup-dotnet from 4 to 5 (#26327)
  • Update SDK to 10.0.100-rc.2.25502.107 (#26305)
  • Replace fpm with dpkg-deb for DEB package generation (#26281)
  • Replace fpm with native macOS packaging tools (pkgbuild/productbuild) (#26268)
  • Separate Store Automation Service Endpoints, Resolve AppID (#26210)
  • Update concurrency groups to prevent merge runs and pull request runs from canceling each other (#26257)
  • Update release tags to version 7.5.4 and 7.4.13 (#26258)
  • Update outdated package references (#26148)
  • Refactor: Centralize xUnit tests into reusable workflow and remove legacy verification (#26243)
  • Convert Azure DevOps Linux Packaging pipeline to GitHub Actions workflow (#26225)
  • Update vPack name (#26090)
  • Update metadata.json for v7.6.0-preview.5 release (#26158)
  • Bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#26128)

Documentation and Help Content

  • Check in 7.6.md after v7.6.0 release (#27063)
  • Update changelog for release v7.5.5 (#27014)
  • Add 7.4.14 changelog (#26998)
  • Update SECURITY.md to remove email reporting option (#26653)
  • Update changelog for the release v7.6.0-preview.6 (#26597)
  • Explain the parameter -UseNuGetOrg in build documentation (#26507) (Thanks @logiclrd!)
  • Update backport prompt (#26392)
  • Add a backport prompt for copilot (#26383)
  • Update linux.md documentation to reflect current CI build configuration (#26255)
  • Add GitHub Copilot instruction files for PowerShell CI build system (#26253)
  • Add documentation for publishing Pester test results in GitHub Actions (#26254)
  • Remove Gitter from README (#26200) (Thanks @xtqqczze!)
  • Remove nightly build status section from README.md (#26227) (Thanks @xtqqczze!)
  • Update changelog for v7.5.4 and v7.4.13 (#26202)

How to install

Installers

You can find the installer packages https://github.com/PowerShell/PowerShell/releases/tag/v7.7.0-preview.1 in the Assets at the bottom of the page. For Linux, macOS, and Windows in multiple versions and architectures (x64, ARM32/64).

WinGet

You can install the new Preview version using the WinGet command-line by running:

winget install --id Microsoft.PowerShell.Preview --source winget

Installation will be silent and looks like this:

This will install it next to your normal GA or LTS version and can be started using pwsh-preview.exe

Brew

On macOS, next to downloading the installer files from the link above, you can use Brew to install it using:

brew install --cask powershell@preview

This will look like this during installation:

And will start using pwsh-preview, too:

Alternative ways

Next to the ones mentioned above, you can find more alternatives here: https://learn.microsoft.com/en-us/powershell/scripting/install/alternate-install-methods?view=powershell-7.6

Testing

You could also try and test code in Runtime Containers, as Justin Grote mentioned here: https://bsky.app/profile/posh.guru/post/3mknfzyb6rl2i

Why should you try the Preview version?

It’s always nice to run new things, but you should try newer versions to be prepared for any breaking changes you might need to circumvent in existing code. Not in production, but in controlled environments, of course 😉

Wrapping up

And that’s what’s new in the latest PowerShell Preview, along with how to install it. Curious about the newer versions and what’s going to happen regarding the MSI vs MSIX installation and its challenges. Have a lovely weekend!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.