Applying a template with PnP to a SharePoint site

  Kiến thức lập trình

I am writing a script to export a template from a SharePoint site then uploading it to a different tenant.
I am using PnP PowerShell library, and I am exporting the template using this command:

Get-PnPSiteTemplate -Out "$outputPath$selectedSiteName.xml" -ConnectionspConnection -Handlers Pages, PageContents

and this one to upload the template:

Invoke-PnPSiteTemplate -Path $templatePath

the export works fine, and I get an XML file, but when I try to import the template, the process gets stuck like this:

WARNING: The source site from which the template was generated had a base template ID value of ############, while the current target site has a base template ID value of ######. This could cause potential issues while applying the template.Applying template to ###########. [ClientSidePages                                    ]

what could be a probable reason for this?

I tried enabling custom script from both the source site and target but no use I tried changing the parameters and creating a brand new site but the problem still persists and I can’t think of a way to debug it

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT