Microsoft has released Windows PowerShell 7.2 Preview 9.  The new preview contains many bug fixes and improvements. You can download the update for Windows, MacOS, and Linux.

Those who have already installed an earlier version of PowerShell 7.2 Preview will be able to update using Windows Update to the latest preview. Alternatively, you can download the installer from the direct download links below.

Windows PowerShell is a command line shell integrated into Windows 10 and Windows 11. It can be used for automating system administration tasks using commands and scripts. Windows PowerShell provides access to Windows Instrumentation (WMI) and Component Object Model (COM) tools in Windows.

Like Visual C++, PowerShell Runtime can be integrated into apps by PS developers.

Changes and improvements

The release notes for PowerShell 7.2 Preview 9 contain a long list of changes. You can check out the notes here. Below is a summary of the changes:

Breaking Changes

  • Make $PSStyle.OutputRendering default to OutputRendering.Host and remove OutputRendering.Automatically fix CA1052 for public API to make classes static if they appear to only have static methods 
  • Update pwsh.exe to accept only .ps1 script files on Windows

Engine Updates and Fixes

  • Improve handling of interface static members by the .NET adapter
  • Protect against unauthorised access when removing test files for AppLocker

General Cmdlet Updates and Fixes

  • Add -PassThru parameter to Set-Clipboard
  • Add -Encoding parameter for Tee-Object
  • Update ConvertTo-Csv and Export-Csv to handle IDictionary objects
  • Update the parameters -Exception and -ErrorRecord for Write-Error to be position 0
  • Don’t use ArgumentList when creating COM object with New-Object as it’s not applicable to the COM parameter set
  • Fix $PSStyle list output to correctly show TableHeader
  • Remove the PSImplicitRemotingBatching experimental feature
  • Fix issue with Get-Process -Module failing to stop when it’s piped to Select-Object
  • Make the experimental features PSUnixFileStat, PSCultureInvariantReplaceOperator, PSNotApplyErrorActionToStderr, PSAnsiRendering, PSAnsiProgressFeatureName stable 
  • Enhance Remove-Item to work with OneDrive
  • Make global tool entrypoint class static
  • Update ServerRemoteHost version to be same as PSVersion
  • Make the initialization of HttpKnownHeaderNames thread safe
  • ConvertTo-Csv: Quote fields with quotes and newlines when using -UseQuotes AsNeeded
  • Forwarding progress stream changes from Foreach-Object -Parallel runspaces
  • Add validation to $PSStyle to reject printable text when setting a property that only expects ANSI escape sequence

Download PowerShell 7.2 Preview 9

For Windows 10, Windows 8.1 and Windows 7

PowerShell-7.2.0-preview.9 for Windows 64-bit.msi [98 MB]

PowerShell-7.2.0-preview.9 for Windows 32-bit.msi [89.7 MB]

For MacOS

powershell-7.2.0-Preview9 for MacOS 64-bit.pkg [60.0 MB]

For Linux

powershell-preview-7.2.0_preview.9 for RedHat Linux.rpm [62.7 MB]

powershell-preview_7.2.0-preview.9 for Debian.deb [61.9 MB]

For more download options, please checkout this download page.

Once you have downloaded and installed the Windows PowerShell Preview, just go to Run –> pwsh to open PowerShell Core window.

To check the installed version of PowerShell, open PowerShell. The CLI should display the currently running version of PS at the top.

If you have already installed PowerShell Core Preview, you can update it to the latest version using the following command:

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"

Takeaway

The improvements and new features in this release are definitely worth trying. We recommend that you do not install this preview update in a production environment unless you are certain that you will need the new features. Nevertheless, if you enjoy automation and PowerShell tools, you should evaluate this preview build on a test computer or virtual machine.

Add Comment

Previous Post Next Post