Pages

Thursday 18 August 2011

Importing & Exporting sites in SharePoint 2010 using Powershell

In SharePoint 2010 you can import and export sites, lists, document libraries and items using Export-SPWeb and Import-SPWeb.

Here’s how you export a site in SharePoint 2010:
Export-SPWeb http://SP/TeamSite –Path C:\Backup\website.bak

If you only want to export a list in a site you can use –ItemUrl parameter as shown below:
Export-SPWeb http://SP/TeamSite -ItemUrl “Lists/Announcements” –Path C:\Backup\website.bak

You can use the Import-SPWeb cmdlet to import the exported files to SharePoint 2010.
Import-SPWeb http://SP/TeamSite –Path C:\Backup\website.bak

You can also check the other multiple options available with these commands(like -force etc..) at the powershell by pressing tab key.

Popular Posts