Using PNP, we can retrieve the complete backup of a site but just to move the site columns from one to another, we need to write custom PS scripts. In this article, I am picking a Site Column group and provisioning it to another site using PNP PowerShell. Before proceeding, we need to ensure that the SharePoint Online Management Shell is installed on your machine. If not, use this link to download and install it. Also, we have to make sure that we have enough permissions to retrieve the field schema from the source site and to provision them in the target site.

If we are provisioning inside the same tenant, there won’t be much trouble in provisioning taxonomy fields. If we need to provision the taxonomy fields in a different tenant, we should have term store related permissions. Otherwise, we are not able to create term sets which, in turn, affect the PNP provisioning process.

I am considering PSSamples site from my tenant as source and will proceed to move the site columns from a Site Column group called “My columns”. I will get all the site columns that come under this group, using the below PS script and frame it as a PNP provisioning XML.

I enclosed the schema of the XML inside the PNP Provisioning schema format which was released on Jan 2018, so that we can provision the result XML to a target site using PNP core libraries. After running the above code, we will be getting an XML like below.

Save the XML in a separate file and run the below script to provision it to a target site.

PowerShell will show some interactive progress bar where we can see the field by field updates. If needed, we can log that the process has been running in the background. After provisioning, go to the target site’s site settings and then go to Site Columns page to see the changes made to the SharePoint site using PNP provisioning.