Forum Discussion
RamBhajan
Jul 19, 2023Copper Contributor
Invoke-PnPSiteTemplate : Error applying default column values
Hello All,
Few weeks back my PS script was working fine but client told to change few list columns.
My script is not working after that and showing the below error.
I have checked list columns but I did not see anything wrong. Could you please guide me how to rectify this issue.
Thank you.
Ram
- Reduce the XML and try each list for it's own see which ones is giving you an issues. Basicly method of exclution
- Vivek JaggaCopper ContributorHi RamBhajan,
Please check the PnP PowerShell version and if its latest then try the same without set default value.
By this you can find the problem and get this fixed. - SvenSieverdingBronze Contributor
Hi RamBhajan
I would enable the PnP trace firstSet-PnPTraceLog -On -Level Debug
And then run your command again.
This will tell you in detail what exactly the "Invoke-PnPSiteTemplate" command does.
You should either get an additional error message or the at least the problematic field (That is the last field the command wanted to update in the trace)
Then we can have a deeper look at why this is happening.
Best Regards,
Sven- RamBhajanCopper Contributor
Thank you for your message.
Let me tell you what I am trying to do.
I have one SP online template site which is containing nearly 15 lists and libraries along with master data. I am creating xml file template based on the template site and applying to a different site using PnP PowerShell.
I am doing the same using the below command.Set-PnPTraceLog -On -LogFile $FilePath -Level Debug
But it is not showing any similar error in the error log file which I can see in the console.
- How has it gone ? What kind of field is it ?
- RamBhajanCopper ContributorNicolasKheirallah
Thank you for your message.
I have one template site which is containing nearly 15 lists and libraries along with data. I am creating xml file template based on this template site and applying to a different site using PnP PowerShell.
So no idea which field type it is throwing error for.- Reduce the XML and try each list for it's own see which ones is giving you an issues. Basicly method of exclution