New-PnPweb with "own" template gives error

Regular Contributor

I have this simple powershell:


$templateFolder = "C:\temp\ps"
Get-PnPProvisioningTemplate -Out $templateFolder\full.xml

New-PnPWeb -Template C:\temp\ps\full.xml -Title bla -Url blasite2

The creation of the .xml runs without errors.


Creating the new web gives me "Invalid file or arguments for template"


What can be the issue here?


Edit: Just to be sure. Ik tried to do the same with an "untouched" teamsite. Same error

1 Reply
best response confirmed by Mike Jansen (Regular Contributor)

When I create te site first with a standard template (STS#0) and apply my template later, using apply-pnpprovisioningtemplate, it works.