Monday, March 23, 2015

SharePoint 2013 Tip: How to Export or Import a Site Using PowerShell

Introduction

This posting reviews how to export an entire site using PowerShell.  In either case, use an elevated SharePoint Management Shell and DO NOT append a "/" to the URL.

How to Export a Site

Export-SPWeb -Identity "http://[URLofSiteToBeExported]" -Path "ToLocationToSaveExportTo"

How to Import a Site

Import-SPWeb -Identity "http://[URLofSiteToBeOverWritten]" -Path "ToLocationOfExportFile"

References
Notes
  • The site you are importing to must be of the same site template as the site being imported.
  • Importing a site effectively overwrites the site (of the same name) that is already there.

No comments: