Jan 06 2017 10:51 AM
I am trying to copy a template from a SPO existing site on my tenant and recieving the following error:
Connect-PnPOnline -url "https://mycustomtenant.sharepoint.com/sites/sptest"
Get-PnPProvisioningTemplate -force -out "C:\SPOTemplates\SPOProject.xml"
Get-PnPProvisioningTemplate : Object reference not set to an instance of an object. At line:1 char:1 + Get-PnPProvisioningTemplate -force -out "C:\SPOTemplates\SPOProject.xml" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: (:) [Get-PnPProvisioningTemplate], N ullReferenceException + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Prov isioning.GetProvisioningTemplate
Visually, I can see that it fails during working on "List instances" but is there any way to debug/analyze and fix the problem?
Jan 07 2017 02:23 AM
Do you use the latest PNP powershell? https://www.microsoft.com/en-us/download/details.aspx?id=35588
Jan 09 2017 07:08 AM
Hi Paul,
I am. I assume the issue might be with one of the lists in the site which I am trying to convert into a site template.
So I am debugging in Powershell
Set-SPOTraceLog -On -Level Debug
and then running the Provisioning command to see where it fails:
Get-SPOProvisioningTemplate -Handler Fields -Out c:\temp\test.xml
Do let me know if I am on the right path, or I should be attempting something else.
Thanks!
Jan 09 2017 09:03 AM
Can you run Get-PnPProvisioingTemplate without any parameters?
It looks like writing to the file is failing.
Jan 13 2017 07:38 AM
Hi Peiter,
Even without parameters, it still fails while trying to process "List instances"
Feb 20 2018 04:11 PM
I'm facing the same issue - failing on List Instances here as well. Looks like the issue has been reported on Github, but there is no known solution yet.