Skip to the content

How to update PnP-PowerShell

  1. Run the PowerShell command below to download the latest version of PnP-PowerShell to the folder "c:\temp".
    Save-Module -Name SharePointPnPPowerShellOnline -Path c:\temp​

    A new folder named "SharePointPnPPowerShellOnline" is created. The folder "SharePointPnPPowerShellOnline" contains a sub-folder for the latest version of PnP-PowerShell (in this example 3.29.2101.0). 

  2. Find the location of where the previous version of PnP-PowerShell is installed by running the following PowerShell command.
    $env:PSModulePath​

    The above command will produce a result similar to the lines below.
    C:\Program Files\WindowsPowerShell\Modules\SharePointPnPPowerShellOnline;
    C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;
    C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\;
    C:\Program Files\SharePoint Online Management Shell\;
    C:\Program Files (x86)\Microsoft SQL Server\140\Tools\PowerShell\Modules\

  3. Copy the folder with the latest version of PnP-PowerShell (in this example folder 3.29.2101.0 created in step 1) to the location "C:\Program Files\WindowsPowerShell\Modules\SharePointPnPPowerShellOnline"

  4. Run the following PowerShell command to verify that the latest version of PnP-PowerShell has been successfully installed
    Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending 

    The above command will return a similar result:

    Name Version
    SharePointPnPPowerShellOnline 3.29.2101.0 
    SharePointPnPPowerShellOnline 3.26.2010.0 
    SharePointPnPPowerShellOnline 3.24.2008.1 
    SharePointPnPPowerShellOnline 3.22.2006.2 
    SharePointPnPPowerShellOnline 3.3.1811.0

The latest releases of PnP-PowerShell can be found at the following link:
https://github.com/pnp/PnP-PowerShell/releases

About the author

Giorgio Capisani

Giorgio Capisani

I am an experienced IT professional specialising in Microsoft technologies (SharePoint 2010/2013/Online, Power Platform, Office 365), with over 10 years of experience in large public and private sector organisations. 

Tech

Visit my blog

So you landed on my website … Why not have a look at my blog and leave a comment or ask a question.