SharePoint provisioning is one of the most powerful features of the PnP ecosystem. Whether you want to automate site creation, deploy list structures, apply branding, or configure complex sites, PnP Provisioning Templates (.xml or .pnp) make the job extremely easy.
This guide explains provisioning in plain language, with real examples, including the XML and .pnp formats and PnP PowerShell commands.
What Is PnP Provisioning?
PnP Provisioning lets you define a SharePoint site structure in a template and then apply that template to other sites.
You can provision:
Site Columns
Content Types
Lists & Libraries
Navigation
Branding
Pages
Webparts
Permissions
Themes
The template can be stored as:
XML file — editable template
.pnp file — packaged template (zip format with assets)
Getting Started with PnP PowerShell
Install PnP PowerShell
Install-Module PnP.PowerShell -Scope CurrentUserHow to Export an Existing Site Template
You can extract an existing site and use it as a template.
Connect-PnPOnline -Url https://tenant.sharepoint.com/sites/Test -Interactive
Get-PnPSiteTemplate -Out "SiteTemplate.xml"Basic Structure of a Provisioning XML
Below is a simple XML template:
<?xml version="1.0"?>
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2022/09/ProvisioningSchema">
<pnp:Preferences Author="PnP" Version="1.0"/>
<pnp:Templates>
<pnp:ProvisioningTemplate ID="BaseTemplate" Version="1">
<!-- ===== Site Fields ===== -->
<pnp:SiteFields>
<Field ID="{1E3A5EC0-1111-4444-8888-222222222222}"
Name="ProjectCode"
DisplayName="Project Code"
Type="Text"
Required="FALSE" />
</pnp:SiteFields>
<!-- ===== Content Types ===== -->
<pnp:ContentTypes>
<pnp:ContentType ID="0x0100AABBCC" Name="Project Document" Group="Custom Content Types">
<pnp:FieldRefs>
<pnp:FieldRef ID="{1E3A5EC0-1111-4444-8888-222222222222}" />
</pnp:FieldRefs>
</pnp:ContentType>
</pnp:ContentTypes>
<!-- ===== Lists ===== -->
<pnp:Lists>
<pnp:ListInstance Title="Projects" TemplateType="100" Url="Lists/Projects">
<pnp:Fields>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" DisplayName="Project Title" Type="Text" />
</pnp:Fields>
</pnp:ListInstance>
</pnp:Lists>
</pnp:ProvisioningTemplate>
</pnp:Templates>
</pnp:Provisioning>
Join the conversation! Your thoughts help the community grow.