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

  • For SharePoint Online:

Install-Module SharePointPnPPowerShellOnline

The output for the preceding command is shown in the following screenshot:

If the machine you are using does not have the NuGet provider, you will need to install that first by typing Y or Yes and then hitting the Enter key. The NuGet provider will get installed in the background.

You may get the prompt for Untrusted repository. PnP PowerShell is an open source initiative, and Microsoft is currently working on making PnP PowerShell a trusted repository. To continue with the installation, type Yes or Yes to All and then hit the Enter key:

The PnP PowerShell module for SharePoint Online will get downloaded and installed in the background. If the installation is successful, you will not get any error message:

Can we install all three modules (SharePoint Online, SharePoint on-premises 2013, and SharePoint on-premises 2016) on a single machine? The answer is yes, but as of the June 2017 release, this requires a little bit of work as the default paths are set for each module and it is beyond the scope of this book. All the examples in this chapter are created with the installation of the SharePoint Online module only.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.141.27