1

I would like to export SharePoint site collection and its subsites, but the structure only and NOT the content. Then I would like to import it to another SP Server.

Export-SPWeb exports it with the content which I don't want as the content is so huge and I don't have disk space for a backup.

I just want the Site and subsite structure, with its site columns, content types, lists and libraries.

I have Sharepoint server 2016 Enterprise. Save site as template is out of the question as the site has enabled publishing features and it will not install correctly in the new environment. In the back of my mind I thought it was possible just by extracting the xml schema and generate site based on that schema.

1
  • What SharePoint version is this? I don't think this is possible with Export-SPWeb, have you considered using PnP PowerShell? Mar 21, 2020 at 11:12

1 Answer 1

0

in the address bar type http://sitename/_layouts/savetmpl.aspx which will give you option to Save site as a Template.

do not check "Include Content" check box which will just save the site as a template without any content

This will save the site in .stp format and you will get the template under Site Action > Site settings > Site Template Gallery

and using this template you can create number of same sites.

Source :

Is it possible to export a Site or Sitecollection without content

 PowerShell scripts location

The above process from downloading the template to creating site with the template, we can automate by executing the set of PowerShell script which is available in the below location :

https://onedrive.live.com/?id=E44EA63872A84C5A%211510&cid=E44EA63872A84C5A

Source to script:

How to back up a site collection without Data?

PnP Provisioning template approach

Similarly, if you are using SharePoint online /2019 /2016, you can use PnP provisioning template approach.

  • In the PnP Provisioning template approach, you need run the Get-PnPProvisioningTemplate in the source site and need run the Apply-PnPProvisioningTemplate in the target site.

  • Before running the Apply-PnPProvisioningTemplate command we should have empty site in the target, just create the framework of the site - sample site without any list content type etc.

To see the example of PnP Provisioning template PowerShell, you may refer the below MSDN article :

Introducing the PnP provisioning engine

Your Answer

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

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