0

I am looking for a quick way to export all sub-sites from a web application and exclude the root url, is there a quick way to accomplish this?

0

maybe this can help :

Get-SPSite http://yourwabapp/sites/sitecol | Get-SPWeb | Where-Object  { $_.ParentWeb -Ne $null } | ForEach-Object { Export-SPWeb -Identity $_ -Path $_.ID }

you will need to adjust the export params according your needs

  • great thanks this works, is there a way to make it a single export or does it need to export each subsite individually? – Adonis L Jun 29 '11 at 11:24
  • I would need to import the sites as well as there are a lot, i would like to do it with a single import command – Adonis L Jun 29 '11 at 11:32
  • Just loop through the exported sites using PowerShell, and import each one. Something like dir $folderpath | For-Each {Import-SPWeb -Path $_.FullName -(Additional import parameters...) – tarjeieo Jun 29 '11 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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