Table of Contents
PnP stands for “Pattern and Practices”, PnP.PowerShell is a new cross-platform PowerShell module released that contains more than 600 cmdlets to work with various Microsoft 365 environments like SharePoint Online, Microsoft Power Automate or Flow, Microsoft Teams, Microsoft Planner, etc.
The Microsoft SharePoint Online Services module remains the de facto management tool for that service with basic commands to connect, add, update and remove items such as site collections, sites and libraries.
PnP PowerShell internally implements Client-Side Object model for its operations. This, in turn, makes the operations adaptable. The same set of operations can be executed on any SharePoint environment. Using PnP PowerShell, the single line of code is used to access any object on SharePoint, where in with traditional client side or server-side object model, multiple lines of code are required to access the objects. The code complexity reduces through this implementation.
If you are using the PowerShell 5.x, then better to upgrade to PowerShell 7.x.
2. Click on Next -> Next -> and then click on Install.
3. Once you click on Install, it will take some time to install, and you can see the progress.
4. After Installation Completed Successfully, Click on Finish
1.Find the PowerShell icon in the search box again.
2.Right-click on the PowerShell icon and select Pin to Start or Pin to Taskbar.
3. Click on the Start button
4. Look for Windows PowerShell (or PowerShell Core) on the right side of the Start Menu.
5. Right-click on the menu item and choose Run as administrator.
To install the new PnP PowerShell module, these have to follow Steps:
Step1. Uninstall the Legacy SharePointPnPPowerShellOnline Module if installed already and Run below the command:
Uninstall-ModuleSharePointPnPPowerShellOnline – Force – AllVersions
Step2: Install the New PnP PowerShell Module and Run Below the command:
Step3: In case you are not a global admin, we need to run the below command to register Azure AD Application and Grant Access to the Office 365tenantlikebelow:
Note: This command will require when execute operation that require higher level Permission and different authentication method
Step4: Connect SharePoint online Site using PnP PowerShell Run below the Command
Connect-PnPOnline -Url https://evolvous.sharepoint.com/
Step5: Get all the lists from a SharePoint site by Run below the PnP PowerShell command:
Step6: Update PnP PowerShell for SharePoint Online Running below the Command
Update-Module -Name “PnP.PowerShell”
Step7: Check PnP PowerShell Version Running below the command
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select-Object Name, Versions
Looking support for PnP PowerShell for SharePoint Online Contact us