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:
- Is it actually possible to faithfully reproduce a modern SharePoint home page with WebParts using PnP provisioning in 2025/2026?
- Is there a reliable flag combination or approach that works?
- Would the
-IncludeAllClientSidePagesflag combined with something else solve this? - Is the only real solution to build the page programmatically with
Add-PnPPageWebPartin 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!