Skip to content
r.

script-samples

pnp/script-samples · Public GitHub repository

A gallery of sample scripts to manage all things Microsoft 365 in Bash or PowerShell using tools like PnP PowerShell, CLI for Microsoft 365, Graph SDK and many more.

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

script-samples live demo screenshot
Captured from the live demo · 2026-11-20

About this project

Author-written excerpt from the project README.

This repository contains scripts for PnP PowerShell, CLI for Microsoft365, Graph SDK PowerShell, SPO PowerShell, and Azure CLI, that are based on real world examples of the scripts that you run to perform tasks.

If you are looking for all the scenario and scripts, we have over 300+, rather than view the repository, please visit: as this has a navigation and filtering experience to help you better find the content you are seek.

What is PnP Script Samples? Check out our YouTube Video for an overview:

Requirements and intended audience

This repository contains scripts for PnP PowerShell, CLI for Microsoft365, Graph SDK PowerShell, SPO PowerShell, and Azure CLI, that are based on real world examples of the scripts that you run to perform tasks.

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-10-20. Source: https://github.com/pnp/script-samples/blob/main/README.md

Recorded maintenance information

Last recorded source update: 2026-11-16. A published release has not been recorded. These dates do not guarantee ongoing maintenance.

Technologies
JavaScript
Licence
MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-20. This does not test every feature.

Browse related categories