
PowerShell 7.7 Has Been Released
This page has been translated by machine translation. View original
I'm Shibata.
PowerShell 7.7 was released in step with the recent release of .NET 11.
The announcement from the PowerShell Team Blog is here.
In this article, I'd like to cover the new features and other changes based on publicly available information.
Release Type and Support Lifecycle
PowerShell 7.7 is built on .NET 11, and its support lifecycle follows that of .NET 11.
As of today, the support schedule is as follows.
| Version | Support Policy | EOL |
|---|---|---|
| 7.7 | Stable | Around November 14, 2028 (documentation not yet updated at the time of publication) |
| 7.6 | LTS (Current) | November 14, 2028 |
| 7.5 | Stable | End of support |
| 7.4 | LTS (Previous) | End of support |
| 7.3 | - | End of support |
| 7.2 | LTS (Previous) | End of support |
| 7.1 | - | End of support |
| 7.0 | LTS (Previous) | End of support |
Because .NET 11 is a non-LTS version, PowerShell 7.7 is a Stable release.
The documentation had not been updated at the time this article was published, but support is expected to last until around November 14, 2028, when .NET 11 support ends.
Also, please note that support for PowerShell 7.4, the previous LTS, ended just recently.
How to Get and Update PowerShell 7.7
Regarding how to get PowerShell 7.7, the MSI installer that was traditionally the main distribution method on Windows has been discontinued, and using the MSIX package (.msixbundle) is now recommended.
This change was first announced on the PowerShell Team Blog at the release of PowerShell 7.7-preview.1. Naturally, the community was strongly opposed (and it is still somewhat of a firestorm), but Microsoft has remained without any clear response.
I personally feel it is not an exaggeration to call it a forced release.
Officially, the justification is that they are "abolishing the legacy MSI installer and switching to the more secure and modern MSIX package," but the MSIX package version of PowerShell has several functional limitations, and these limitations have not been resolved even as of the PowerShell 7.7 release.
Limitations of MSIX PowerShell
The limitations of MSIX PowerShell are summarized on the following page.
Put simply, MSIX PowerShell is the same as a Microsoft Store application, so system-level configuration changes are restricted.
The main ones are:
- Only user-level installation is basically supported
- PowerShell Remoting cannot be used
- AllUsers profiles that require writing to
$PSHOME($PROFILE.AllUsersAllHosts,$PROFILE.AllUsersCurrentHost) are not supported - The following commands that require writing to
$PSHOMEare not supportedRegister-PSSessionConfigurationUpdate-Help -Scope AllUsersEnable-ExperimentalFeature -Scope AllUsersSet-ExecutionPolicy -Scope LocalMachine
In addition, there are limitations such as:
- It cannot be installed on Server Core, which does not support MSIX
In addition to Microsoft's documentation, there are several issues and discussions on GitHub, so I'll introduce them here.
- Deprecation of MSI and EXE based installers in lieu of MSIX #27292
- Tracking: MSIX packaging gaps for PowerShell 7 #27565
Installing MSIX PowerShell
The quickest way to install MSIX PowerShell is to install it from the Microsoft Store or use WinGet.
Especially when using WinGet, the MSI version was provided up to PowerShell 7.6, and it changes to the MSIX version from PowerShell 7.7, so you need to uninstall the MSI version first.
# Winget cannot perform updates across different installation methods, so first uninstall the existing MSI version
winget uninstall --id Microsoft.PowerShell
# After uninstalling the MSI version, install the MSIX version
winget install --id Microsoft.PowerShell
Also, although unofficial, Devolutions, which sells products such as Remote Desktop Manager, has forked PowerShell on its own and provides an MSI installer.
- Unofficial distribution: Devolutions/pwsh-distro
Other Platforms
The installation methods on macOS and Linux are almost the same as before.
The updates seem to be the newly added RPM package for Azure Linux 4 and DEB package for Arm64 Debian.
PowerShell 7.7 New Features and Breaking Changes
According to the PowerShell Team blog, PowerShell 7.7 focuses mainly on security enhancements and feature improvements.
Looking at What's new as well, my impression is that there are many improvements to validation in each cmdlet and in the script engine.
In this article, I'll mainly explain the content announced on the PowerShell Team blog.
Updates to Bundled Modules
In PowerShell 7.7, the bundled modules have been updated to the following versions.
Microsoft.PowerShell.PSResourceGetv1.3.1PSReadLinev2.4.5
New Cmdlets and Cmdlet Improvements
PowerShell 7.7 newly adds New-TemporaryDirectory.
Until now there was New-TemporaryFile, which creates a temporary file, and this is a command that creates a temporary directory.
# Create a temporary directory and return a DirectoryInfo object. You can add an arbitrary prefix with the -Prefix parameter
PS C:\> $tempDir = New-TemporaryDirectory -Prefix build
PS C:\> $tempDir.FullName
C:\Users\xxxxxxxx\AppData\Local\Temp\buildujfgi5jm.nda
# Delete it when no longer needed
PS C:\> Remove-Item -LiteralPath $tempDir.FullName -Recurse
In addition, the PowerShell Team Blog announces the following improvements.
- Added the
-Extensionparameter toJoin-Path - Added
-ExcludePropertytoFormat-Table,Format-List, andFormat-Custom- However, using
-ExcludePropertydisables the format specifications defined in ps1xml, and in some cases it actually resulted in more output being displayed...
- However, using
- Added the
SubjectAlternativeNameproperty to the return value of theGet-AuthenticodeSignaturecommand - Added the
ToRegex()method to theSystem.Management.Automation.WildcardPatternclass
Simple examples of each are as follows.
# Add the exe extension with Join-Path
PS C:\> Join-Path $env:TEMP 'pwsh' -Extension exe
C:\Users\xxxxxxxx\AppData\Local\Temp\pwsh.exe
# -ExcludeProperty was added to Format-* commands
PS C:\> [PSCustomobject]@{Key="key";Value="Value"} | Format-List -ExcludeProperty key
Value : Value
# SubjectAlternativeName was added to the Signature object returned by Get-AuthenticodeSignature
# I didn't have a suitable certificate, so I used an MSI file instead
PS C:\> Get-AuthenticodeSignature C:\temp\AWSCLIV2.msi | Get-Member
TypeName:System.Management.Automation.Signature
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
IsOSBinary Property bool IsOSBinary {get;}
Path Property string Path {get;}
SignatureType Property System.Management.Automation.SignatureType SignatureType {get;}
SignerCertificate Property System.Security.Cryptography.X509Certificates.X509Certificate2 SignerCertificate {ge…
Status Property System.Management.Automation.SignatureStatus Status {get;}
StatusMessage Property string StatusMessage {get;}
SubjectAlternativeName Property string[] SubjectAlternativeName {get;}
TimeStamperCertificate Property System.Security.Cryptography.X509Certificates.X509Certificate2 TimeStamperCertificat…
# Convert a wildcard pattern to a regular expression
PS C:\> $pattern = [System.Management.Automation.WildcardPattern]::new("*.txt")
PS C:\> $regex = $pattern.ToRegex()
PS C:\> $regex.IsMatch("file.txt")
True
Security Enhancements
Apparently PowerShell 7.7 made the following security-related changes.
However, the release notes do not directly describe the changes, so it was difficult to find the details.
- Strengthened restrictions in
Constrainedlanguage mode- Apparently so... but I could not find the specific changes.
- Strengthened validation of runtime arguments in PowerShell Remoting
- Strengthened validation of communication frames in PowerShell Remoting
- It seems validation of the frame header length was added
- Strengthened CDXML schema (XSD) validation in CIM cmdlets
- Strengthened validation of commands that are implicitly executed in PowerShell Remoting
- Strengthened validation of updatable help files (CAB files)
- Strengthened permission checks on the temporary HOME directory that is used as a fallback on UNIX platforms when the
HOMEenvironment variable cannot be found - Added the
-FetchExternalReferenceparameter to theTest-Jsoncommand, so that explicit permission is now required to reference external URLs within a JSON schema- It seems to have been backported to PowerShell 7.6.10 as well, slipped in with another pull request
Other Changes
Here are some items from the other changes that caught my attention.
- Fixed incorrect results of
Resolve-Path -Relativefor names starting with a dot (#28087) - Fixed a bug where
Get-Command -UseFuzzyMatchingreturned duplicate results (#26593) - Fixed
Clear-Hostfailing when connecting remotely from a non-Windows environment to Windows (#28115) - Fixed broken display of progress containing full-width characters (#26185)
Breaking Changes
According to the PowerShell Team Blog and What's new, there are only the following four breaking changes.
-
The IDs generated by the
New-Guidcommand were changed from the conventional UUID v4 to UUID v7- If you want to generate a UUID v4, use
[Guid]::NewGuid()
- If you want to generate a UUID v4, use
-
The
-Propertyparameter of theFormat-Table,Format-List, andFormat-Customcommands no longer allows NULL or empty strings -
The exception raised when a parameter is specified incorrectly while creating a
[System.Management.Automation.CompletionResult]object was changed fromSystem.Management.Automation.PSArgumentNullExceptiontoSystem.ArgumentException- It was changed to an "empty string exception" following the point that a "null exception" is inappropriate for the exception raised when an empty string is specified for a String-type parameter
-
Changed the evaluation when conditions are specified in the form
-[operator]:$falseinWhere-Object- For the detailed behavior, it's best to see the GitHub issue, but my honest feeling is that "nobody would actually write it like this."
These are all quite minor behavioral changes, but New-Guid alone seems likely to have a fairly large impact.
# New-Guid now returns a UUID v7 ID
PS C:\> (New-Guid).Version
7
PS C:\> New-Guid
Guid
----
01a1d31d-c0c7-7282-af4b-5b238c9fd708
# Use [Guid]::NewGuid() if you want a UUID v4
PS C:\> [Guid]::NewGuid().Version
4
PS C:\> [Guid]::NewGuid()
Guid
----
be4868be-2f85-4a42-8778-1a470fa3dd1c
Experimental Features
No features were promoted in PowerShell 7.7, and the following three features continue to be offered as experimental features.
Conclusion
That's all.
I think the discontinuation of the MSI installer is the biggest change by far.
Personally, I feel it was premature, so unfortunately I can't evaluate it positively...
That said, the situation won't change immediately, so it will come down to either switching to the MSIX version or waiting and seeing until PowerShell 7.8, the next LTS.
Please decide as appropriate.