SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there are way to run the Export-SPSite command without exporting sub-sites? I just want to export the parent site from a web app, but there are about 120 sub-sites in the site collection that I want to skip.

share|improve this question

I think you mean Export-SPWeb: It does not have a switch for excluding subsites.

The other options for export are the SPExport class in the Microsoft.SharePoint.Deployment, but unfortunately the SPExportSettings object doesn't have a way to exclude subsites...not sure why it doesn't when the Sites Web Services ExportWeb method does support it...

The ExportWeb method of the Sites Web Services has a parameter to IncludeSubWebs: And it works (...just set it to False)...we tried all these different methods when we were StoragePoint testing to determine how the OOB capabilities handled remoted BLOBS.

share|improve this answer
+1 this is exactly what I needed to hear. Thanks Rob! – Mike May 30 '14 at 16:06

The SPExportSettings of the SPExport object has an obscure ExportObjects property that is used to control if subwebs are included or not. Adding SPIncudeDecendants.Content will exlude subwebs. See for example:

It seems that the Export-SPWeb cmdlet does not expose ExportObjects, still you can use the object model directly in powershell like this:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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