The preview 2 is still based on .NET 5, as .NET 6 is yet to be released. However, Microsoft claims that the stable version of PowerShell 7.2 will be based on .NET 6. Let’s see what PowerShell 7.2.0 brings to the table.
Download PowerShell 7.2.0 Preview 2
For Windows 10, Windows 8.1 and Windows 7
PowerShell-7.2.0-Preview2-win-x64.msi [95.1 MB] PowerShell-7.2.0-Preview2-win-x86.msi [85.9 MB]
For MacOS
powershell-7.2.0-Preview2-osx-x64.pkg [63.4 MB]
For Linux
CentOS powershell-7.2.0-Preview2-1.centos.8.x86_64.rpm [64.7 MB] Debian powershell_7.2.0-Preview2-1.debian.11_amd64.deb [65.2 MB] powershell_7.2.0-Preview2-1.debian.10_amd64.deb [65.2 MB] Ubuntu powershell_7.2.0-Preview21.ubuntu.20.04_amd64.deb [65.2 MB] powershell_7.2.0-Preview2-1.ubuntu.18.04_amd64.deb [65.2 MB] powershell_7.2.0-Preview2-1.ubuntu.16.04_amd64.deb [65.2 MB] For more download options, please checkout this download page.
PowerShell 7.2.0 Preview 2 features
Thanks to Microsoft and PowerShell contributors, some significant changes have been made to the released version. Some new features and bug fixes have been highlighted in the release post by Microsoft. Let’s shed some light on what those are.
New feature
PSStyle automatic variable for ANSI rendering
This is an experimental feature. Meaning, Microsoft is currently awaiting users’ feedback to see whether or not to release this feature with the stable release of PowerShell 7.2. The ANSI escape code is an extension of the ASCII escape code. This feature will make it easier for the users to author content containing the ANSI code, which controls the text decoration parameters, such as its font, color, size, italics, etc. You can read more about the feature here.
Bug fixes
Some issues that accompanied the previous release of PowerShell have also been addressed with this Preview release.
Code Cleanup: Microsoft states that nearly two-thirds of the pull requests have been answered, resulting in a code cleanup. This refers to a piece of code dedicated to cleanup leftover data and other unneeded material from the system after the actual code has been executed.An issue of the users receiving a bugcheck of “Incorrect Function” when trying to use an executable file on a drive that is not in the NTFS format has been addressed. This issue was first experienced with PowerShell 7.1 due to an issue with the reparse points, which has now been fixed.PipelineVariable Common Parameter: This object now correctly contains all of the parameters passed through it, instead of containing just the first input parameter.
Here is the complete changelog: You can learn more about the PowerShell 7.2 changelog from here.
How to install PowerShell 7.2 Preview 2 in Windows 10
Use the guide provided to download PowerShell 7.2 on Windows 10, 8.1, and 7. You may also download the latest stable release of PowerShell by running the following command in the existing PowerShell on your Windows: You can also download and install PowerShell over the network. This method is best suited for sysadmins.
Closing words
PowerShell 7.2 is still in preview so you should never install it on a production system. But it is always fun to test out the new features on a dev machine. If you love automation on Windows 10 and Windows Server, you should definitely check out this new release of PowerShell. Also see:
Download And Install PowerShell 7.2 Preview 3Download PowerShell 7.2 Preview 5 (Installation Guide)Download PowerShell 7.2 preview 4 (Installation guide)Download PowerShell 7.3 Preview 5 (Offline Installers)Download PowerShell 7.3 Preview 7 (Offline Installers)