What's New in PowerShell 7.1

The latest versions of PowerShell are not included out-of-the-box with Windows 10. So, you might not know that PowerShell is already on version 7.1 The version in Windows 10 is called Windows PowerShell 5.1 and it is no longer being developed. But it is still supported by Microsoft. PowerShell versions 6 and later are cross-platform, and work on Windows, macOS, and Linux.

PowerShell 7.1 was released late in 2020. It builds on PowerShell 7.0 and it fixes issues reported by users. There are also a few improvements. PowerShell 7.0 was released in March 2022 and it came with several new features:

  • Pipeline parallelization with ForEach-Object -Parallel
  • New operators:
    • Ternary operator: a ? b : c
    • Pipeline chain operators: || and &&
    • Null conditional operators: ?? and ??=
  • A simplified and dynamic error view and Get-Error cmdlet for easier investigation of errors
  • A compatibility layer that enables users to import modules in an implicit Windows PowerShell session
  • Automatic new version notifications
  • The ability to invoke DSC resources directly from PowerShell 7 (experimental)

PowerShell 7.1 is based on .NET Core 5.0

This release of PowerShell is based on .NET Core 5.0. PowerShell 7.0 was based on .NET Core 3.1. PowerShell 7.1 is part of the Stable release branch and it is also the first version to be published in the Microsoft Store. When you install PowerShell from the Store, Windows 10 automatically keeps PowerShell up to date. If you’d prefer to install PowerShell 7.1 using a downloaded install package, check out Microsoft’s instructions for installing PowerShell on Windows, macOS, and Linux.

But because Store apps are restricted by design in Windows 10, you can’t establish PowerShell Remoting sessions using WSMAN to Store-based installs of PowerShell. However, SSH remote sessions are supported.

Sponsored Content

Passwords Haven’t Disappeared Yet

123456. Qwerty. Iloveyou. No, these are not exercises for people who are brand new to typing. Shockingly, they are among the most common passwords that end users choose in 2021. Research has found that the average business user must manually type out, or copy/paste, the credentials to 154 websites per month. We repeatedly got one question that surprised us: “Why would I ever trust a third party with control of my network?

Image # Expand
What’s New in PowerShell 7.1 (Image Credit: Russell Smith)

PSReadLine 2.1.0

Tab completion lets you start typing a command and then by pressing the TAB key, have the rest of the command completed for you. But because of the sheer number of available PowerShell cmdlets, tab completion has become less effective.

The PSReadLine module adds Predictive Intellisense, which uses the history of cmdlets you typed to predict what command you want to use. In PowerShell 7.0, you needed to download the PSReadLine module manually. PSReadLine is now included in PowerShell 7.1.

Experimental features

PSNullConditionalOperators and PSUnixFileStat are mainstream in PowerShell 7.1. PSNullConditionalOperators introduces new operators for Null conditional member access operators – ?. and ?[]. And PSUnixFileStat adds data from the Unix stat API in the output of the file system provider to provide a more Unix-like file listing.

For a full list of changes in PowerShell 7.1, see Microsoft’s website here.


Related Topics:


Don't have a login but want to join the conversation? Sign up for a Petri Account

Comments (0)

Leave a Reply

IT consultant, Contributing Editor @PetriFeed, and trainer @Pluralsight. All about Microsoft, Office 365, Azure, and Windows Server.
13 Email Threat Types to Know About Right Now

As email threats evolve and multiply, keeping track of them all—and staying protected against the many different types—becomes a complex challenge. Today, that requires more than just the traditional email gateway solution that used to be good enough.

In this eBook you will learn:

  • What are the most common and challenging email attacks for organizations?
  • How to defend against sophisticated email threats, such as spoofing, social engineering, and fraud
  • How to protect employees at the inbox level with the right technologies and security-awareness training
  • How to use a multilayered protection strategy to reduce susceptibility to email attacks and better defend your business and employees

Sponsored by: