Collaborate, Innovate, Automate

PnP PowerShell Scripts

← Back to Resources

PnP PowerShell Scripts

Ready-to-use PowerShell scripts for SharePoint Online and Microsoft 365 administration:

All Site Navigation Content Metadata Folder Content Approval Multilingual Security Search Migration
Script Name Description Tags
Create Site Columns Automate site column creation across SharePoint sites Site Content
Create Navigation Build consistent navigation structures programmatically Navigation Site
Create Content Types Standardise content types with metadata definitions Content Metadata
Create Term Store Implement enterprise taxonomy and managed metadata Metadata
Add Navigation Translations Support multilingual navigation experiences Navigation Multilingual
Update Folder Approval Status Manage content approval workflows for individual folders Folder Content Approval
Update Folder Approval Statuses Bulk update approval statuses across multiple SharePoint folders Folder Content Approval
Update Content Type Name Rename content types while preserving configurations and data Content Metadata
Update Pages Approval Status in a Folder Manage page approval workflows for all pages within a specific folder Folder Content Approval
Update Pages Content Type in a Folder Bulk update content types for all pages within a specific folder structure Folder Content
Create Group & Add Users Automate SharePoint group creation and bulk user assignment for permission management Site Security
Create Translations of Pages in Folder Create translated page structure for all pages in a folder with duplicate checking Multilingual Content
Add Group Members Automate user provisioning with appropriate permission levels for SharePoint sites Site Security
Add Multiple Site Collection Admins Bulk assign site collection administrators across multiple SharePoint Online sites using a CSV file Site Security
Add Multiple Document Libraries Bulk create multiple SharePoint Online document libraries from a CSV file in a single operation Content Site
Create Folder Structure Automate the creation of standardized folder hierarchies in SharePoint document libraries Folder Site
Export Multiple Pages Bulk export SharePoint pages for backup, migration, or content management Content Site
Import Multiple Pages Bulk import SharePoint pages for site restoration or content migration Content Site
Site Template Export Export SharePoint sites as reusable templates for standardisation and provisioning Site
Site Template Apply Apply exported site templates to provision new SharePoint sites with consistent configurations Site
Create Group & Add Group Members Automate SharePoint group creation and add multiple users as members in a single operation Site Security
Compare Two Site Settings Compare configuration settings between two SharePoint sites to identify differences and ensure consistency Site
Get Site Crawl Logs Retrieve SharePoint site crawl logs for search troubleshooting and optimisation analysis Search Site
Get Site Search Settings Retrieve comprehensive SharePoint site search settings and configuration details Search Site
Move SharePoint Pages Move pages between folders with single and batch operation support for content reorganization Migration Content
Find All Links on Site Pages Scan all SharePoint site pages to identify and report hyperlinks for content audits and migration planning Migration Content
Set 404 Error Page Configure custom 404 error page for SharePoint Online sites to improve user experience Search Navigation
Update URLs in an Excel Column Bulk update URLs in Excel spreadsheets for SharePoint migrations and domain consolidation projects Migration Content
Create SharePoint List Automate creation of custom SharePoint lists with configurable templates and CSV logging Content Metadata
Delete Term Group Safely remove a term group and all its term sets from the SharePoint Online term store Metadata
Export Megamenu Navigation Export the full megamenu navigation hierarchy (parent, child, grandchild) to CSV for auditing and documentation Navigation Site
Site Settings Export Export a comprehensive snapshot of a SharePoint site's configuration to JSON for auditing, comparison, and migration planning Site Migration
Folder Path Length Analyse folder and page path lengths in the Site Pages library to identify items approaching SharePoint's 400-character URL limit Content Metadata Migration
Find Column Usage Identify where named site columns are used across lists, libraries, and content types within a SharePoint site Metadata Search
Find Base List Template ID Return the base template name and numeric template ID of any SharePoint Online list or library Content Site
Create MessageBanner List Provision the MessageBanner SharePoint list with all required columns for the PnP Modern Search intranet banner solution Content Search Site

Microsoft 365 Documentation

PowerShell Resources

Tools & Utilities