Forum Discussion
PnP Provisioning Engine - Apply-SPOProvisioningTemplate Fails On Subweb (Powershell)
Update: Fixed (kind of)
I was using 2.6.1608.0
I checked and all of the local files that are referenced by the template are located in the folder.
I was able to fix this by getting the template with GetProvisioningTemplate provided by the PnP C# sample Provisioning.Framework.Console. Previously I was referencing an .xml file I got with the PowerShell cmdlet and then running C# method on that outputted file. I don't know what makes this C# method different than referencing a previously created xml file
I'm still not able to use the .xml file I created with PowerShell cmdlet but when I get template directly and reference it from memory, it works.
The original plan was to reference a previously created XML file but this works for the time being.
hmm...both should work. Can you log an issue in our pnp sites core issue list, including the XML you're reading?
- nitinkumar kakuldeDec 30, 2016Copper Contributor
Hi,
I am also getting the below error and nothing get created in sub site using PnP provision commands.
Connect-SPOnline -Url https://Domain.sharepoint.com/Sites/TT1 -Credential DEV #(Get-Credential)
Apply-SPOProvisioningTemplate -Path .\RetailerExtranetQARootSubSiteSiteStructureToTSW_2.xml
Error :
Apply-SPOProvisioningTemplate : Value cannot be null.
Parameter name: stream
At line:1 char:1
+ Apply-SPOProvisioningTemplate -Path .\RetailerExtranetQASubSiteStruc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Apply-PnPProvisioningTemplate], ArgumentNullException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate