PowerShell: Create SharePoint Online pages from a template and add them to navigation

PowerShell: Create SharePoint Online pages from a template and add them to navigation
I recently needed to rapidly build out a SharePoint Online Communication Site with a large number of similar pages to match a pre-defined product hierarchy. I could have manually created the pages but given the amount of time it would take and the repeatable nature of the activity I thought I would look into using PowerShell to loop through a CSV file and automatically create all the pages, give them the appropriate page title, publish the pages and add them to the Site navigation. The following post will walk you thru the following steps: Create a Page Template in SharePoint Online using the web interface Create CSV file with columns for FileName, PageTitle, and NavTitle Add the Patterns and Practices (PnP) PowerShell modules and load my SharePoint site in PowerShell Use PowerShell to loop over the CSV and… Save a new Page based on the FileName from CSV Set that Page’s Title to the PageTitle ...