Thursday, June 18, 2015

Import sites, lists, or document libraries in SharePoint

We can import a site, list, or document library in SharePoint by PowerShell.
Start the SharePoint Management Shell.


Import-SPWeb [-Identity] <SPWebPipeBind> -Path <String> [-ActivateSolutions <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-HaltOnError <SwitchParameter>] [-HaltOnWarning <SwitchParameter>] [-IncludeUserCustomAction <None | All>] [-IncludeUserSecurity <SwitchParameter>] [-NoFileCompression <SwitchParameter>] [-NoLogFile <SwitchParameter>] [-UpdateVersions <Append | Overwrite | Ignore>] [-WhatIf [<SwitchParameter>]]

Import-SPWeb http://site -Path export.cmp -UpdateVersions Overwrite
This example imports the contents of export.cmp into a site at http://site, overwriting the versioned content on the site with the contents of the export.cmp file.

No comments:

Post a Comment