Monday, September 28, 2015

Export and Import Subsite in SharePoint 2013 using PowerShell

Export-Import subsite using PowerShell in SharePoint 2010
how to export SharePoint subsite? export subsite SharePoint 2013 PowerShell, Unlike SharePoint 2013, you'll have to create a subsite first and then import. Export-SPWeb cmdlet used to export a sub site, list or document library.

Open SharePoint 2013 Management Shell and run this command. Change Site URL and Path values accordingly.

Export-SPWeb "" 
         -Path "D:\backup\sales-us.cmp" -IncludeVersions All -includeusersecurity

To export a site, list or document library by using Central Administration:
You can also export a Subsite from SharePoint 2010/2013/2016 Central Administration via "Export a site or list"  capability. Go to SharePoint Central Administration >> Backup and Restore >> Click on "Export a site or list" link under "Granular Backup" group.
Export subsite sharepoint 2013 powershell
Important: Both the source and destination sites should be using same template!

Import subsite in SharePoint 2013 using PowerShell
Import-SPWeb PowerShell cmdlet used to import a sub site from backup.
Import-SPWeb "" 
        -Path "D:\backup\sales-us.cmp"  -includeusersecurity -UpdateVersions overwrite 
With these cmdlets, we can Export and Import a particular sub site, list or document library. You can also use Export-SPWeb & Import-SPWeb cmdlets to copy list with data between SharePoint Sites/Web Apps/or between different environments. E.g. Copy a SharePoint list from Dev to Staging server.

Please note, export-import is not as same as backup-restore. Certain artifacts will not be copied during export-import. Such as:
  • Workflow association-data
  • Audit logs, Created By, Modified By details, etc.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...