Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active November 17, 2021 15:29
Show Gist options
  • Save plembo/6215f257cf0a36c3a990153e64786fe9 to your computer and use it in GitHub Desktop.
Save plembo/6215f257cf0a36c3a990153e64786fe9 to your computer and use it in GitHub Desktop.
Using the PnP Management Shell

Using PnP PowerShell

Installing

PS> Install-Module PnP.PowerShell

Connecting and Testing

First, authorize PnP to access SharePoint Online for admin purposes:

PS> Register-PnPManagementShellAccess

Next, connect to the SharePoint tenant:

PS> Connect-PnPOnline -Url https://[tenantname].sharepoint.com -Interactive

Test to make sure it's working:

PS> Get-PnPTenant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment