PowerShell : Getting Started with PnP PowerShell Cmdlets

Installing PnP PowerShell module
Installing PnP PowerShell module

Hi All,

Greetings for the day!!!

In this article I will discuss bit about PnP PowerShell CMDLETS.

What is PnP PowerShell?

  • PnP PowerShell is a cross-platform PowerShell Module.
  • It provides over 700 cmdlets that work with Microsoft 365 environments.
  • These include Microsoft 365 services like
      • SharePoint Online,
      • Microsoft Teams,
      • Microsoft Planner,
      • Microsoft Power Platform,
      • Microsoft Entra,
      • Microsoft Purview,
      • Microsoft Search, and more.
    • It runs on Windows, Linux and MacOS.

    Installing PnP PowerShell? How do I install PnP PowerShell?

    • We need PowerShell 7.4.0 or later to use PnP PowerShell.
    • We can execute following PowerShell CMDLET
    Install-Module PnP.PowerShell

    PowerShell terminal showing command to install PnP.PowerShell module with an untrusted repository warning.
    figure: Installing PnP PowerShell module

    Updating PnP PowerShell module

    • If we have already PnP PowerShell module install, we can update to latest version by following CMDLET
    Update-Module PnP.PowerShell
    

    Executing my first PnP PowerShell

    $ClientID = "768437d1-257a-3a5e-b41a-f58213bf6d33"
    PS C:\> $SiteURL = "https://knowledgejunction1.sharepoint.com/"
    PS C:\> Connect-PnPOnline -Url $SiteURL -Interactive -ClientId $clientId
    PS C:\> Get-PnPSite              
    
    Url                                                     CompatibilityLevel
    ---                                                     ------------------
    https://knowledgejunction1.sharepoint.com               15

    Screenshot of a PowerShell command line interface displaying commands to connect to a SharePoint Online site using PnP PowerShell, including the commands 'Connect-PnPOnline' and 'Get-PnPSite'.
    figure: After installing PnP PowerShell module – executing the PnP PowerShell CMDLET

    Uninstalling PnP PowerShell

    • We can uninstall PowerShell module using Uninstall-Module CMDLET
    Uninstall-Module PnP.PowerShell -AllVersions
    

    REFERENCES

    Thanks for reading!!!

    HAVE A FANTASTIC TIME AHEAD !!! LIFE IS BEAUTIFUL 🙂

    Prasham Sabadra

    LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

    You may also like...

    2 Responses

    1. June 9, 2025

      […] We have detailed article to start with PnP PowerShell module. PowerShell : Getting Started with PnP PowerShell Cmdlets – https://microsoft365junction.com/2025/06/04/powershell-pnp-powershell/ […]

    2. April 20, 2026

      […] PowerShell : Getting Started with PnP PowerShell Cmdlets – https://knowledge-junction.in/2025/06/04/powershell-pnp-powershell/ […]

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.