
Hi @Woldeselassie, Solomon (NIH/NEI) [C]
Thank you for posting your question in the Microsoft Q&A forum.
You’ve clearly put a lot of effort into finding a solution, and it’s totally understandable to feel stuck when the built-in tools don’t handle more advanced setups like custom content types in document libraries.
Based on my research, you're on the right track with PnP Provisioning Engine.
I found this helpful article to create Provisioning templates, please take it as a reference Introducing the PnP provisioning engine | Microsoft Learn
You can export a template using Get-PnPSiteTemplate
and apply it with Invoke-PnPSiteTemplate
instead of Get-PnPProvisioningTemplate
and Apply-PnPProvisioningTemplate
according to this Upgrading from the Legacy version of PnP PowerShell | PnP PowerShell
You may also want to take a look at this Invoke-PnPSiteTemplate | PnP PowerShell
To make your template appear in the From Your Organization, there are some steps you may follow:
- If your template is in PnP XML format and you want to extract supported actions into a site script > Convert your PnP template to a site script using
Convert-PnPSiteTemplate
Note: This conversion only includes actions supported by site scripts. Complex elements like custom content types may not be fully captured.
- Register the site script using Add-SPOSiteScript
- Create a site design and associate it with the script Add-SPOSiteDesign
Note: This method works best when your template can be expressed in JSON.
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
I hope this helps.
If you have any specific questions, please feel free to post back.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.