apply-pnpprovisioningtemplate
1 TopicApply-PnPProvisioningTemplate : File not Found
Hello, I have a problem using Apply-PnPProvisioningTemplate with PowerShell on a SharePoint Online context. #website created to be used as a template Connect-PnPOnline -Url "https://$principalWebSite/" –Credentials $adminCredentials New-PnPWeb -Title "srcTemplate" -Url srctemplate -Description "srcTemplate" -BreakInheritance -InheritNavigation -Template "STS#0" -Locale 1036 Disconnect-PnPOnline #website exported as a template.pnp Connect-PnPOnline –Url "https://$principalWebSite/srcTemplate" –Credentials $adminCredentials Get-PnPProvisioningTemplate -Out $path/$file.pnp -PersistBrandingFiles -PersistPublishingFiles Disconnect-PnPOnline #website created to be modified by the template Connect-PnPOnline -Url "https://$principalWebSite/" –Credentials $adminCredentials New-PnPWeb -Title "newWebSite" -Url newwebsite -Description "newWebSite" -BreakInheritance -InheritNavigation -Template "STS#0" -Locale 1036 Disconnect-PnPOnline #website modified by the template Connect-PnPOnline -Url "https://$principalWebSite/newwebsite" –Credentials $adminCredentials Set-PnPTraceLog -On -LogFile $path/$file.xml -Level Debug Apply-PnPProvisioningTemplate -Path $modelePath #-Handlers Pages -ExcludeHandlers Lists Set-PnPTraceLog -Off Disconnect-PnPOnline Error Message : File not found Apply-PnPProvisioningTemplate : Fichier introuvable. Au caractère Ligne:3 : 1 + Apply-PnPProvisioningTemplate -Path $modelePath #-Handlers Pages -Exc ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: (:) [Apply-PnPProvisioningTemplate], ServerException + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate srcTemplate File is founded and I can see that it is working for a while (attachments, lists, library, etc.) and this it stop with this error. srcTemplate & log file in attachment. Does anyone have an idea ?Solved12KViews1like18Comments