logo
search
SharePoint Document Issues

Fix Get-SPOSiteScriptFromWeb Not Including SharePoint Site Pages

Guest WriterGuest Writer Oct 10, 2026 868 views

Question details

The user is attempting to generate a SharePoint site script that includes pre-populated site pages and corporate training content, but the exported script fails to include the page contents and navigation.

Fix Get-SPOSiteScriptFromWeb Not Including SharePoint Site Pages
Product
Microsoft SharePoint
Device & OS
Windows 10
Scenario
Generating a reusable template site pre-populated with customized pages, project FAQs, and corporate training content for new project teams.
Observed behavior
The generated site script using Get-SPOSiteScriptFromWeb only creates or updates the Site Pages list layout, completely missing the actual pages, hub settings, and document content.
Before you start

Ensure you have SharePoint administrative permissions and the SharePoint Online Management Shell installed, as running administrative PowerShell scripts is required to alter site custom script settings.

Solution 1

Modify the Get-SPOSiteScriptFromWeb IncludedLists Parameter

Use this solution to ensure that the basic list structure for Site Pages is included in the site script.

Site scripts are generally designed to create structural layouts, lists, columns, and views rather than copying actual page or document content. Hub navigation cannot be included because it is dynamically managed by the associated hub.

1
Open PowerShell

Launch the SharePoint Online Management Shell as an administrator.

2
Run Get-SPOSiteScriptFromWeb

Execute the Get-SPOSiteScriptFromWeb command and explicitly include the SitePages list in the IncludedLists parameter to capture the list layout.

Free Microsoft Office alternative

Create Corporate Training Content with WPS Office

While SharePoint handles site deployment, creating the actual training documents and project FAQs is easier with a reliable productivity suite. WPS Office is a free, lightweight, and highly compatible alternative to Microsoft Office, making document creation a breeze.

  1. 1. Download the Installer: Visit the WPS Office website and click 'Download WPS Office Free' to get the installer for your device.
  2. 2. Install WPS Office: Run the lightweight installer and follow the on-screen prompts to complete the setup.
  3. 3. Create Your Content: Open WPS Office to instantly start writing and formatting your project templates and documents, then upload them to your SharePoint library.
Seamless compatibility with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx)Lightweight installation process perfectly optimized for Windows 10Familiar, intuitive user interface for a zero-learning-curve transitionIdeal for drafting corporate training documents, FAQs, and project content to upload to SharePoint
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't Get-SPOSiteScriptFromWeb copy my document content?

Site scripts are fundamentally designed to deploy site architecture. They define structural components like lists, columns, views, and layouts, but they do not extract or copy physical files, documents, or the text inside site pages.

Can I include hub navigation in my SharePoint site script?

No, hub navigation cannot be included within an exported site script. Hub navigation is controlled and dynamically managed by the associated hub site, rather than by the individual site's local settings.

What are the requirements for saving a SharePoint site as a template with content?

To save a site as a template with content, you must have SharePoint administrative permissions, the site's Publishing feature must be disabled, and custom scripts must be allowed for the site via the Set-SPOsite PowerShell command.