Forum Discussion
Blair24
Dec 07, 2018Copper Contributor
PnP Get Site Template - Object reference not set to an instance of an object
Hey, Wondering if anyone else has had a similar issue? Get the error "Object reference not set to an instance of an object" when running Get-PnPProvisioningTemplate. Have tried it both on PS & PS ...
Tom Castiglia
Jan 11, 2019Iron Contributor
Hi Blair -
I've been able to reproduce this as well. Its related to the PageContents handler. If you don't need the contents of your home page in your template you should be able to exclude that handler and it may work.
I'm curious if you are running this in an O365 tenant that is using Targeted Release? I have reproduced this error in 2 tenants using Targeted Release. But in another tenant not on Targeted Release I don't have this error.
I've been able to reproduce this as well. Its related to the PageContents handler. If you don't need the contents of your home page in your template you should be able to exclude that handler and it may work.
I'm curious if you are running this in an O365 tenant that is using Targeted Release? I have reproduced this error in 2 tenants using Targeted Release. But in another tenant not on Targeted Release I don't have this error.
- Blair24Jan 11, 2019Copper ContributorHi Tom
Yeah we have targeted release on our tenant. Although the issue seems to be fixed for ourselves when you upgrade the PnP PS module to 3.4.- Tom CastigliaJan 11, 2019Iron ContributorYup, same here! Thanks.