SOLVED

New-PnPweb with "own" template gives error

Highlighted
Regular Contributor

I have this simple powershell:

Connect-PnPOnline https://blabla.sharepoint.com/sites/blasite

$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
Highlighted
Best Response confirmed by Mike Jansen (Regular Contributor)
Solution

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