Installing and working with PnP PowerShell cmdlets
There are three ways to install the PnP: PowerShell cmdlets in the PowerShell Gallery, setup files, and installation scripts. PowerShell Gallery (https://www.powershellgallery.com/) is the approach recommended by the PnP team. There are three different versions of PnP PowerShell cmdlets: SharePoint Online, SharePoint on-premises 2013, SharePoint on-premises 2016. The reason they have separate modules for SharePoint on-premises 2013, 2016 and SharePoint Online is that they have different versions of CSOM libraries/SDKs for SharePoint Online and SharePoint on-premises 2013 and 2016.
PowerShell Gallery
If you are using Windows 10 or if you have PowerShellGet (https://github.com/powershell/powershellget) installed, you can use the following commands to install the PnP PowerShell cmdlets for different versions of SharePoint:
- For SharePoint on-premises 2013:
Install-Module SharePointPnPPowerShell2013
- For SharePoint on-premises 2016:
Install-Module SharePointPnPPowerShell2016...