Patrick Lamber
Patrick Lamber IT Geek focusing on Microsoft collaboration software.

Connect to SharePoint Online using PNP-PowerShell

This post is part of a post series.

The PNP-PowerShell is a library of PowerShell commands that allows you to perform complex provisioning and artifact management actions towards SharePoint. I see these commands as a valuable extension to the existing SharePoint Online Management Shell.

Useful for the daily business and batch operations on multiple SharePoint Online sites or Office 365 Groups. If you want to use it you need to have the following prerequisites:

  • Have the SharePoint Online or global administrator role on your tenant
  • Install the PnP-PowerShell module

How do I install the PnP-PowerShell module?

If you have the latest PowerShell version installed, you can perform the installation procedure by using the Install-Module commandlet.

Install-Module -Name SharePointPnPPowerShellOnline

You can validate the installation by running the Get-Module command. It will return all installed PNP-PowerShell versions on your machine.

Get-Module -Name SharePointPnPPowerShellOnline -ListAvailable | Select Name,Version 

How do I update the PNP-PowerShell Module?

You can update the PowerShell module by using the Update-Module commandlet.

Update-Module -Name SharePointPnPPowerShellOnline 

How do I uninstall this module?

The module can be uninstalled by using the Uninstall-Module command. It will uninstall the latest version of the module on your machine.

Uninstall-Module -Name SharePointPnPPowerShellOnline 

How do I connect to SharePoint Online?

Before running any command against Office 365 assets, you have to authenticate yourself using the Connect-PnPOnline command. You can find a description of this command here.

This post is part of a post series.

comments powered by Disqus