Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →
Tutorial hub · free, step by step

SharePoint PowerShell tutorials

Automate SharePoint Online and Microsoft 365 with PnP PowerShell and the SharePoint Online Management Shell: connect, manage sites, lists, items and files in bulk, and fix the errors you'll hit along the way.

51 tutorials7 topicsBy a 13-times Microsoft MVP
Learning path

New to SharePoint PowerShell? Follow these steps

Already working with SharePoint PowerShell? Skip ahead to the topic you need.

  1. Install and connect

    Set up PnP PowerShell and sign in to your tenant.

  2. Build sites and lists

    Create sites, lists and columns from a script.

  3. Move data in bulk

    Load, copy and clean up list items, files and folders.

  4. Administer and troubleshoot

    Groups, Teams, labels and the errors you'll meet.

Topic 01

Install and connect

Set up PnP PowerShell and the SharePoint Online Management Shell, then sign in to your tenant.

5 tutorials
Topic 02

Sites and site settings

Create sites, list every site in the tenant and read or change site settings.

10 tutorials
Topic 03

Lists and columns

Create lists, add and customize columns, and read list settings in bulk.

7 tutorials
Topic 04

List items and bulk data

Create, read, update, delete, copy and bulk-load list items, even past 5,000.

6 tutorials
Topic 05

Document libraries, files and folders

Create libraries, upload and download files, check what exists and report sizes and permissions.

7 tutorials
Topic 06

Microsoft 365 groups, Teams and compliance

Work with Microsoft 365 group members, Teams and sensitivity labels from PowerShell.

4 tutorials
Topic 07

Errors and fixes

Fixes for sign-in, permission and 'not recognized' errors in SharePoint and Microsoft 365 PowerShell.

11 tutorials

Want a structured path?

Automate SharePoint Online and Microsoft 365 administration with PowerShell 7 and PnP PowerShell, from the basics to bulk scripts. Or see the SharePoint PowerShell career roadmap with the skills, certification and pay for the role.

Bijay Kumar, 13-times Microsoft MVP
Who writes these tutorials

Bijay Kumar

13-times Microsoft MVP · Founder, TSinfo Technologies

Bijay has more than 18 years of hands-on experience with Microsoft technologies, specializing in SharePoint, the Power Platform, SPFx and Microsoft 365. He has trained thousands of developers and IT professionals through SPGuides, wrote “SharePoint Online Modern Experience Practical Guide”, co-wrote “Microsoft Power Platform: A Deep Dive”, and runs the SPGuides YouTube channel. Every lesson comes from real client projects.

FAQ

Frequently asked questions

PnP PowerShell or the SharePoint Online Management Shell?

Use the SharePoint Online Management Shell for tenant-level admin tasks such as site and sharing settings. Use PnP PowerShell for site-level work like lists, items, files and permissions. Many admins install both.

Which PowerShell version does PnP PowerShell need?

Current PnP PowerShell releases need PowerShell 7.4 or later. The SharePoint Online Management Shell runs in Windows PowerShell 5.1; in PowerShell 7 you import it with the -UseWindowsPowerShell switch.

Why does Connect-PnPOnline ask for a client ID?

The shared PnP Management Shell app was retired in September 2024, so you now register your own Microsoft Entra ID app and pass its client ID. Our connect tutorial shows how to set it up.

Why is Connect-MsolService or Get-MsolUser not recognized?

The MSOnline module has been retired. Use Microsoft Graph PowerShell instead, for example Connect-MgGraph and Get-MgUser. The errors topic on this page covers the replacements.

Can PowerShell work with more than 5,000 list items?

Yes. Paging with -PageSize in Get-PnPListItem and batching with New-PnPBatch let you read and write lists larger than the 5,000-item view threshold.