Could someone suggest me a simple powershell script I can use to copy a content type and a list (excluding the content) from one site collection to another. I am thinking it can easily be done using pnp powershell but I still a novice. Will appreciate your help.


1 Answer 1

Connect-PnPOnline https://yoursite.com/sites/yourFIRSTsite
Get-PnPProvisioningTemplate -Out "MyTemplate.xml" -Handlers Lists,ContentTypes
Connect-PnPOnline https://yoursite.com/sites/yourSECONDsite
Apply-PnPProvisioningTemplate -Path "MyTemplate.xml"

Depending on how many lists/content types are on the site you might want to open the MyTemplate.xml file before applying it to the second site and manually delete any entries you don't want to copy over.


  • Can I do same with "include content" with PnP?.. I use C# example - it copies lists but they are empty..
    – Gennady G
    Feb 28, 2019 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.