PnP Provisioning Template has incorrect values

%3CLINGO-SUB%20id%3D%22lingo-sub-266399%22%20slang%3D%22en-US%22%3EPnP%20Provisioning%20Template%20has%20incorrect%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266399%22%20slang%3D%22en-US%22%3E%3CDIV%3EI%20have%20a%26nbsp%3BTeam%20Site%20with%20Publishing%20enabled.%26nbsp%3B%20This%20is%20a%20Subsite%2C%20not%20a%20RootWeb.%26nbsp%3B%20When%20I%20use%20it%20as%20my%20provisioning%20template%2C%20incorrect%20values%20are%20being%20loaded.%26nbsp%3B%20For%20example%20the%20BaseSiteTemplate%20is%20for%20Publishing%20Site%20when%20I%20used%20at%20Team%20Site%20Template(STS%230)%2C%20and%20the%20Scope%20is%20RootSite%20when%20it%20should%20be%20Web.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CPROVISIONINGTEMPLATE%20id%3D%22%26quot%3BTEMPLATE-C24C0C337A1845998192BDCB01125C2A%26quot%3B%22%20version%3D%22%26quot%3B1%26quot%3B%22%20basesitetemplate%3D%22%26quot%3BBLANKINTERNET%230%26quot%3B%22%20scope%3D%22%26quot%3BRootSite%26quot%3B%22%3E%3C%2FPROVISIONINGTEMPLATE%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3BHere%20is%20my%20PowerShell%20Script%3A%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23006400%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%23%20Variables%20definition%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24tenant%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22apptivsolutionscom%22%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24sourceSite%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22%2Fsites%2FPnPTestHome%22%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24templateFile%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22C%3A%5CPnPDropDirectory%5CPnPTemplate.xml%22%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%23%20Office%20365%20Login%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24webUrl%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22https%3A%2F%2F%7B0%7D.sharepoint.com%7B1%7D%2F%22%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-f%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24tenant%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%2C%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24sourceSite%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EWrite-Output%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%20%24(%3C%2FFONT%3E%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22Connecting%20to%20%7B0%7D%22%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-f%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24webUrl%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E)%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EConnect-PnPOnline%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-Url%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24webUrl%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-Credentials%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238a2be2%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EWCMStoredCredentials%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%23%20Save%20Template%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EWrite-Output%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22Saving%20PnP%20template%22%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EGet-PnPProvisioningTemplate%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-Out%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24templateFile%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-PersistBrandingFiles%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-PersistPublishingFiles%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3B%3CBR%20%2F%3EWhat%20am%20I%20doing%20wrong%3F%3C%2FFONT%3E%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor
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!

 

 

 

0 Replies