SOLVED

New-PnPweb with "own" template gives error

Iron 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
best response confirmed by Mike Jansen (Iron Contributor)
Solution

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

1 best response

Accepted Solutions
best response confirmed by Mike Jansen (Iron Contributor)
Solution

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

View solution in original post