Friday, September 14, 2012

Powershell Script to Importing & Exporting sites in SharePoint 2010

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

Export-SPWeb http://SP/TeamSite –Path C:\Backup\website.bak

If we only want to export a list in a site you can use –ItemUrl parameter as shown below:

Export-SPWeb http://SP/TeamSite -ItemUrl “Lists/<<MyList>>” `
–Path C:\Backup\website.bak

We can use the Import-SPWeb cmdlet to import the exported files to SharePoint 2010.

Import-SPWeb http://SP/TeamSite –Path C:\Backup\website.bak


No comments:

Post a Comment