Forum Discussion

Martin Muldoon's avatar
Martin Muldoon
Copper Contributor
Oct 03, 2018

PnP Provisioning Template has incorrect values

I have a Team Site with Publishing enabled.  This is a Subsite, not a RootWeb.  When I use it as my provisioning template, incorrect values are being loaded.  For example the BaseSiteTemplate is for Publishing Site when I used at Team Site Template(STS#0), and the Scope is RootSite when it should be Web.

<pnp:ProvisioningTemplate ID="TEMPLATE-C24C0C337A1845998192BDCB01125C2A" Version="1" BaseSiteTemplate="BLANKINTERNET#0" Scope="RootSite">

 Here is my PowerShell Script:

# Variables definition

$tenant = "apptivsolutionscom";

$sourceSite = "/sites/PnPTestHome";

$templateFile = "C:\PnPDropDirectory\PnPTemplate.xml";

 # Office 365 Login

$webUrl = "https://{0}.sharepoint.com{1}/" -f $tenant, $sourceSite;

Write-Output $("Connecting to {0}" -f $webUrl);

Connect-PnPOnline -Url $webUrl -Credentials WCMStoredCredentials;

 # Save Template

Write-Output "Saving PnP template";

Get-PnPProvisioningTemplate -Out $templateFile -PersistBrandingFiles -PersistPublishingFiles;
What am I doing wrong?

Thanks!

 

 

 

No RepliesBe the first to reply

Resources