The latest release of PowerShell Core was recently released—PowerShell 7.1. What new features and changes does PowerShell 7.1 include? Let's take a look at this latest release of PowerShell Core. As most know, in 2019, Microsoft introduced what would be the next iteration of PowerShell—PowerShell Core. Since then, it has rapidly gained momentum in the industry due to its many advantages over the traditional Windows PowerShell.

The general architecture of PowerShell Core ^

As a brief primer, let's take a quick look at the difference between the standard Windows PowerShell and PowerShell Core. Windows PowerShell has been included in the Windows operating system since Windows 7 SP1 and Windows Server 2008 R2 SP1. Windows PowerShell makes use of .NET Framework, which is also the traditional release of .NET. It is not a cross-platform version of PowerShell, meaning Windows is required.

However, Microsoft released PowerShell Core in conjunction with the new .NET Core, a cross-platform release. This means the new PowerShell Core releases run in Windows, Linux, and macOS. Microsoft has also open-sourced PowerShell Core, as it is available from GitHub. It dramatically extends the reach of PowerShell as an automation framework across multiple platforms and use cases.

Decoupling the release cycle from Windows releases also allows Microsoft to have a much more aggressive stance with releasing new PowerShell features and capabilities. As we will see below, with the different PowerShell release cadence, a new PowerShell Core version is released every three months.

New Features in PowerShell 7.1 ^

There are a few significant features and changes to note with PowerShell 7.1 compared to previous releases of PowerShell Core, including the following:

  • Built on .NET Core 5.0
  • Includes PSReadLine 2.1.0
  • Now published in the Microsoft Store

Built on .NET Core 5.0

One of the key points to note with each PowerShell Core release is that they correlate to a new .NET Core release. Whereas PowerShell 7.0 is built on .NET Core 3.1 (LTS), PowerShell 7.1 is built on .NET Core 5.0 (Current). When downloading PowerShell Core releases, you can choose between Long Term Support (LTS) and Stable. PowerShell 7.1 is in the Stable branch release.

Downloading PowerShell Core versions

Downloading PowerShell Core versions

Stable releases happen three months after the latest LTS release. Stable releases have more current features than the LTS release. Some may choose to stick with the LTS release of PowerShell Core for production. However, there may be features in the Stable release that are needed in production. Thus, organizations may load and use PowerShell 7.1, based on the Stable branch with additional features.

Includes PSReadLine 2.1.0 ^

Tab completion has long been around in various programming IDEs. Tab completion allows typing only part of a command, pressing Tab, and having the complete command typed automatically for you. However, with the now hundreds of PowerShell cmdlets, including Azure PowerShell cmdlets, simple tab completion, while helpful, is not as effective as it once was.

Predictive Intellisense is the next evolution of simple tab completion. With Predictive Intellisense, PowerShell predicts what command you may want to enter based on cmdlet history. Predictive Intellisense is made possible by the PSReadLine module. Prior to PowerShell 7.1, you had to download and install the PSReadLine module. However, the PSReadLine 2.1.0 module comes with PowerShell 7.1. You simply have to enable it. To enable the Predictive Intellisense module by way of the PSReadLine 2.1.0 module, use the following cmdlet:

Set-PSReadLineOption -PredictionSource History

You will note below that after enabling the PSReadLine 2.1.0 module, when typing a cmdlet, you will see a suggested cmdlet based on Predictive Intellisense. When juggling hundreds of similar cmdlets, it is incredibly helpful to have the Predictive Intellisense module's extra help as part of PowerShell 7.1. Also, as shown in the PowerShell 7.1 Core command window, the PSReadLine module requires no installation, as PowerShell 7.1 includes the module by default.

Enabling the PSReadLineOption in PowerShell 7.1

Enabling the PSReadLineOption in PowerShell 7.1

Now published in the Microsoft Store

As of PowerShell 7.1, the Microsoft Store now offers the ability to download PowerShell Core directly from the store. Before the release of PowerShell 7.1, you had to download new releases of PowerShell from the official PowerShell GitHub page, found here. For those running Windows 10, PowerShell's addition as part of the Windows Store will allow finding, downloading, and installing PowerShell Core with much less effort.

An additional benefit to this includes having the Microsoft Store provide lifecycle management for your installation of PowerShell. With new PowerShell releases, these should appear as available updates along with the regular updates displayed in the Microsoft Store. While downloading and installing the latest versions of PowerShell from the Microsoft Store is easy enough, it will eliminate the manual efforts of checking for the newest version, downloading, and installing the updates by hand.

PowerShell 7.1 offered on Microsoft Store

PowerShell 7.1 offered on Microsoft Store

Other improvements and additions

In addition to the significant new features listed above, Microsoft has focused on solving many community issues and bug fixes with the PowerShell 7.1 release. In addition to bug fixes and other enhancements, PowerShell 7.1 now supports Ubuntu 20.04, which is not supported by the PowerShell 7.0 release. To see a full list of the specific new features, cmdlet updates, and other enhancements, check out Microsoft's post here.

Wrapping Up ^

Microsoft's new PowerShell Core release continues to evolve and gain many new features and capabilities. Microsoft has introduced very welcomed changes with this release, which provides new features and delivery options. PowerShell 7.1 is a Stable code branch offering, built on top of .NET 5.0. So, the support lifecycle of PowerShell 7.1 will follow the support lifecycle of .NET 5.0. Microsoft has now included Predictive Intellisense by default with PowerShell 7.1, which will help PowerShell advanced users and beginners alike. Finally, Microsoft is now offering PowerShell 7.1 as part of the official Microsoft Store. It makes PowerShell Core easy to download and install, similar to any other Microsoft Store app. Also, updates to PowerShell will take place using the normal Microsoft Store update operations.

avatar
0 Comments

Leave a reply

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2021

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account