u/Stonk-Monkey69

PnP Site Template not transferring modern page WebParts. Is it actually possible?

Hey everyone,

I'm migrating our company's SharePoint Classic project site (~120 client sub-sites) to a modern SharePoint architecture. The plan is a Hub Site with one Team Site per client, provisioned automatically via Power Automate + PnP PowerShell.

What I've built:

  • A Hub Site "Projets PCI"
  • A template site (PCI-TemplateClient) with a custom home page including WebParts (document libraries, quick links, activity), a logo placeholder, custom navigation, and branded theme

The problem: No matter what flags I use when exporting, the home page WebParts never transfer properly to the new site. The structure (libraries, columns, navigation) comes through fine, but the page itself is either blank, duplicated, or missing the branding entirely.

Commands I've tried:

powershell

Get-PnPSiteTemplate -Out "gabarit-client.pnp"
Get-PnPSiteTemplate -Out "gabarit-client.pnp" -Handlers PageContents, Navigation, Lists, Fields
Get-PnPSiteTemplate -Out "gabarit-client.pnp" -IncludeAllClientSidePages

All result in either broken navigation (duplicated items), missing logo, wrong theme colors, or blank page content.

My questions:

  1. Is it actually possible to faithfully reproduce a modern SharePoint home page with WebParts using PnP provisioning in 2025/2026?
  2. Is there a reliable flag combination or approach that works?
  3. Would the -IncludeAllClientSidePages flag combined with something else solve this?
  4. Is the only real solution to build the page programmatically with Add-PnPPageWebPart in the provisioning script?

For context: we're using PnP PowerShell 3.x on PowerShell 7, Team Sites connected to M365 Groups, tenant is SharePoint Online.

Any help appreciated — this has been a week-long battle!

reddit.com
u/Stonk-Monkey69 — 1 day ago