Invoke-Pnpsitetemplate Exception from HRESULT: 0x8107140F

Kamil Buszmann 5 Reputation points
2023-06-19T11:46:42.68+00:00

Hi, I'm creating a site template with code below.

$SiteURL = "url to sharepoint"
Connect-PnPOnline -Url $SiteURL -Interactive
Set-PnPSite -Identity $SiteURL -NoScriptSite $false
Set-PnPTraceLog -On -LogFile C:\Users\Kamil\Desktop\template\cvbewq\cvbewqtraceoutput.txt
Get-PnPSiteTemplate -Out C:\Users\Kamil\Desktop\template\cvbewq1\cvbewq.pnp -IncludeAllPages -PersistBrandingFiles -IncludeAllTermGroups -IncludeSiteCollectionTermGroup -IncludeSiteGroups -IncludeHiddenLists

When i create this template i want to invoke this tempate on new site i'm using this code

$SiteURL = "url to sharepoint"Connect-PnPOnline -Url $SiteURL -InteractiveSet-PnPSite -Identity $SiteURL -NoScriptSite $falseSet-PnPTraceLog -On -LogFile C:\Users\Kamil\Desktop\template\cvbewq1\cvbewq.pnp\cvbewqDoNowejStrony.txtInvoke-PnPSiteTemplate -Path C:\Users\Kamil\Desktop\template\cvbewq1\cvbewq.pnp

And i get this error

"invoke-pnpsitetemplate : exception from hresult: 0x8107140f"

Do you know why it happens and how to fix it?

Best Regards

Kamil

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,973 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,741 Reputation points
    2023-06-20T20:37:27.42+00:00

    Hello,

    Usually this error occurs because the Content Database is full, most times because Sharepoint has been installed over SQL Express edition which limits the size of the Databases to 4 gigabytes.

    For the rest, this error message could be related to throttling: https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online#what-is-throttling

    SharePoint Online uses throttling to maintain optimal performance and reliability of the SharePoint Online service. Throttling limits the number of user actions or concurrent calls (by script or code) to prevent overuse of resources.

    That said, it is rare for a user to get throttled in SharePoint Online. The service is robust, and it is designed to handle high volume. If you do get throttled, 99% of the time it is because of custom code. That doesn't mean that there aren't other ways to get throttled, just that they're less common. For example, you spin up 10 machines and have a sync client going on all 10. On each sync 1 TB of content. This would likely get you throttled.

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.