Introduction
To install PnP PowerShell 2.x on your Windows 10 machine, you must have PowerShell 7 and above version. Let me give you a little background. I need PowerShell 7 (in fact, I was forced :)) to work with the latest PnP PowerShell 2.x modules as it has some new enhancements such as setting up classification at the document library, retrieving service principal registrations for an Azure AD App, and much more. Please refer to the change log in the references section for complete updates. The PnP PowerShell 2.x modules require PowerShell 7, which won't work on version PowerShell 5.1 and below. In this article, we will go through the following.
- Installing PowerShell 7
- Installing PnP PowerShell 2.1.0 (the stable version as of writing this document)
Also, the latest development on PnP PowerShell will be continuing on PowerShell 7. It's time to upgrade from PowerShell 5 to PowerShell 7, a cross-platform tool. More about the PowerShell 7 can be learned from the references section.
Steps to Install PowerShell 7.x
Let's go to the steps needed to install PowerShell 7. Note that the steps are documented based on Windows 10 OS. Similar steps should work for other OS too.
Step 1. Go to the below link.
Step 2. Install the MSI package by going to the "Installing MSI Package" section. You can also go to the below direct link to download the MSI package.

Step 3. The installation is simple. It is self-explanatory, and follow the prompts to install PowerShell 7.
Step 4. Validate the installation by going to Windows Start Programs and searching for PowerShell.
Once the installation is successful, check for PowerShell 7 in your start programs.

The above steps conclude the installation of PowerShell 7 on your Windows 10 machine.
Installing PnP PowerShell 2.x
Step 1. Open PowerShell 7, and you may have noticed that there is no ISE for this version 7, and everything should run via the console.
Step 2. Get the installed PnP PowerShell version by entering the below command.
Get-Module "PnP.PowerShell" -ListAvailable |
Select-Object Name, Version |
Sort-Object Version -Descending

Step 3. In this case, I already have installed 1.12.0. If no previous version of PowerShell is installed, you will get the blank output.
Step 4. Install the PnP PowerShell 2.x version by running the below command.
Install-Module -Name "PnP.PowerShell"






Join the conversation! Your thoughts help the community grow.