New version of PowerShell 7 released with improvements for Linux in .Net Core and more

PowerShell

Microsoft developers unveiled recently through a Microsoft blog post releasing the new final version of PowerShell 7, which is already available for Windows, macOS, and Linux. The latter introduces new features related to support for .Net Core and new carriers.

PowerShell is optimized to automate command line operations and provides built-in tools for processing structured data in formats such as JSON, CSV, and XML, and also supports REST API and object models.

In addition to the command shell, an object-oriented language is offered for scripts and a set of utilities for managing modules and scripts.

Starting with the PowerShell 6 branch, the project has been developed using the .NET Core platform. By default, PowerShell transfers telemetry with the description of the operating system and the program version (to disable telemetry, you must set the environment variable POWERSHELL_TELEMETRY_OPTOUT = 1 before starting).

What's new in PowerShell 7?

In summary, PowerShell 7 integrates the following changes: migration from the .Net Core version 2.x to the new version 3.1 and introduction of the ternary operators “a? b: c ", assignment and zero merge"? and ?? = «.

With the update from .Net Core 2.x to 3.1 introduced in this new version of PowerShell 7 is allows greater compatibility with PowerShell modules existing for Windows.

“If you haven't been able to use PowerShell Core 6.x in the past due to cross-module compatibility issues, this may be the first time that you will be able to take advantage of some of the great features we have already provided. From the beginning of the PowerShell Core project! «, Microsoft emphasizes.

He adds that:

»The PowerShell Core 6.x to 7.0 passage also marks our .NET Core 2.x to 3.1 passage.

NET Core 3.1 retrieves a large number of APIs from the .NET Framework (especially on Windows), which allows much greater compatibility with existing modules Windows PowerShell. This includes many Windows modules that require GUI functionality such as Out-GridView and Show-Command, as well as many role management modules that ship with Windows.

The full list of supported operating systems is offered as x64 variants of Windows 7, 8.1, and 10, Windows Server 2008 R2, 2012, 2012 R2, 2016, and 2019, macOS 10.13+, Red Hat Enterprise Linux (RHEL) / CentOS 7+, Fedora 29+, Debian 9+, Ubuntu 16.04+, openSUSE 15+, and Alpine Linux 3.8+.

The Debian and Ubuntu ARM32 and ARM64 flavors are also supported, as is ARM64 Alpine Linux. Microsoft claims that although not officially supported, there are community-produced packages for Arch and Kali Linux. PowerShell 7 is available to download from GitHub and there is also installation documentation available for Windows, macOS, and Linux.

Microsoft is already looking at PowerShell 7.1, the first preview of which will be released soon. Until we get back to the new features that make PowerShell 7 special:

  • .NET Core 3.1 (LTS)
  • Windows compatibility envelope
  • new version notification
  • new error view and Get-Error cmdlet
  • pipe chain operators (&& and |||)
  • ternary operator (a? b: c)
  • null assignment and coalescence operators (??? and ?? =)
  • invoke-DscResource cross-platform (experimental)
  • out-GridView, -ShowWindowWindow and other GUI cmdlets are back in Windows

Finally, if you want to know more about it, you can check the details In the following link.

How to install PowerShell 7 on Linux?

For those interested in being able to install this new version of PowerShell on their system, can get the packages ready for different Linux distributions from the following link

Although in general they can install the app with the help of Snap packages, the only requirement is that your system has support to install these types of packages and have the service installed.

To install just open a terminal and execute the following command on it:

snap install powershell --classic

Finally, in the case of opting for specially built packages for each distribution.

The installation can be done with your package gesture or from the terminal with dpkg (for deb packages or with rpm or dnf (for rpm packages).

For example, in the case of deb packages:

sudo dpkg -i powershell-7.0.0-1*.deb

In the case of RPM in general distributions with:

sudo rpm -i powershell-7.0.0-1*.rpm

Or in the case of Fedora or RHEL:

sudo dnf -i powershell-7.0.0-1*.rpm


A comment, leave yours

Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Charles O said

    Widows even in the soup. Go now! I switched to Linux to forget it and are dedicated to messing with shoehorn.