Microsoft 365


Active Directory


Windows Server


Microsoft Teams Day is back!



PowerShell 7 is Now Available for Windows, Linux and macOS

Brad Sams


If you have been hanging around the Petri neighborhood, you might be mistaken to think that PowerShell 7 is already available. But up until today, it was in preview.

Microsoft is making PowerShell 7 now generally available which means that the cross-platform automation tool is available for Windows, Linux, and macOS. Along with a bunch of cmdlets/APIs and bug fixes, there are several new features as well:

  • 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)

This release also completes the move from .NET Core 2.x back to 3.1. What this means is that backward compatibility will be significantly improved over that of PowerShell 6, especially on Windows; if you were not using an old script because of compatibility issues, you may want to give it a run again.

Since the early preview days of PowerShell 7, we have been diving deep looking at the new features; you can find more information here.

The compatibility list for PowerShell 7 is quite lengthy and includes products Microsoft no longer supports:

  • 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+
  • Alpine Linux 3.8+
  • ARM32 and ARM64 flavors of Debian and Ubuntu

If you are looking to get started with PowerShell 7, make sure to check out our guide here as it covers the basics or if you need to upgrade, you can learn more about that process here.

More in PowerShell


How To Set Environment Variables With PowerShell

Dec 5, 2022 | Sukesh Mudrakola


How to Use a PowerShell Foreach Loop

Oct 24, 2022 | Ivan Mirchev


How to Use a PowerShell Array

Oct 19, 2022 | Michael Reinders


Filtering with PowerShell Where-Object: Easy Examples

Oct 10, 2022 | Michael Reinders


What is PowerShell and How to Get Started With It?

Sep 7, 2022 | Mike Kanakos


Use a PowerShell Substring to Search Inside a String

Aug 11, 2022 | Jeff Hicks

Most popular on petri

Article saved!

Access saved content from your profile page. View Saved