PnP PowerShell – Apply-PnPProvisioningTemplate stuck on initializing engine

Apply-PnPProvisioningTemplate stuck

Today I used PnP PowerShell to provision one of my sites. For some reason my Apply-PnPProvisioningTemplate  CmdLet just didn’t want to run properly. Every time I ran Apply-PnPProvisioningTemplate it would just hang on Initializing engine.  I enabled the debugging for my PnP Powershell, but still I didn’t have much luck finding out what was happening.

How do you possible debug this? In my situation it was working in 2 other ‘identical’ SharePoint 2016 farms and I wasn’t able to run any Visual Studio debugger in this environment.

After a while ( about 5 or 10 minutes) I did get an error message:

apply-pnpprovisioningtemplate : field or property "groupid" does not exist.

But this is very little help!

Time to look at the Template that I’m trying to provision. The only place I found GroupId properties were Taxonomy fields. It there a problem with my Managed Metadata Service?

 

Like I said earlier my farms are identical, therefore it is a bit of a surprise that on this 3rd farm things aren’t working as expected. Usually PnP Powershell is my friend and it looks like my friend is letting me down! Sometime you just have to convince your friends that it is a good idea to play!

PnP PowerShell versions

One small difference is that I’m using a different version of PnP PowerShell on this 3rd farm. As the 3rd farm was installed slightly later than the others. I had to install PnP PowerShell yesterday on a machine local to this farm.  Just to make sure that it isn’t something related to the version of my PnP PowerShell, I decided to export an existing site with Get-PnPProvisionigTemplate so that I can compare the template generated by the new version of PnP Powershell and the older version of PnP PowerShell. I was however, getting a similar error message but now Get-PnPProvisioningTemplate was complaining about a property “ListExperienceOptions”

This  is giving me a great clue! ListExperienceOptions are not relevant for SharePoint 2016! So I checked the version of PnP Powershell that was installed

I quickly uninstalled the Online version of PnP PowerShell and I installed the SharePoint 2016 version.

Once I had the right version of PnP PowerShell scripts installed all started working! Hopefully this will help you if you make a mistake like I did and install the wrong version of PnP Powershell.

Share
Pieter Veenstra

Business Applications and Office Apps & Services Microsoft MVP working as a Microsoft Productivity Principal Consultant at HybrIT Services. You can contact me using contact@veenstra.me.uk.

Recent Posts

Calculate the Sum for a SharePoint column in Power Automate

Last week Shane Young asked me about calculating the Sum for a SharePoint column in…

2 days ago

Object must implement IConvertible in Power Apps

In Power Apps when you do a Patch to create a new item or to…

6 days ago

Get started with adaptive cards in Power Automate

Getting started with adaptive cards can be difficult. In this post i have written some…

2 weeks ago

Create PDF documents from data in Power Automate

In this post I will look at how to create PDF documents from data. Use…

2 weeks ago

Unnest nested arrays in Power Automate

We all know this problem, you have a nested array in Power Automate but how…

3 weeks ago

Advanced settings not loading in Power Platform

Yesterday one of my clients showed me an issues where the Advanced settings didn't load.…

4 weeks ago
%%footer%%