This is an example for copying SharePoint lists from one SharePoint site to another. You can apply this pattern to copy sites, lists, libraries, site columns, site content types, groups, managed metadata and workflows.
- Click PowerShell on the lower left menu.
- If you prefer launching PowerShell from Windows, type Import-Module Sharegate after launching.
- Connect to your source SharePoint site (see Connect-Site).
$srcSite = Connect-Site -Url http://myfarm1/sites/mysourcesite
- Connect to your destination SharePoint site (see Connect-Site).
$dstSite = Connect-Site -Url http://myfarm2/sites/mydestinationsite
- Get the lists and libraries you would like to copy to the destination site (see Get-List).
$srcList = Get-List -Site $srcSite -name Documents
- Copy the lists and libraries to the destination site (see Copy-List)
$result = Copy-List -List $srcList -DestinationSite $dstSite
- You can print the result in the windows or export the migration report to an Excel file (see Export-Report).
$resultResult : Operation completed successfully. SessionId : 140221-1 SiteObjectsCopied : 1 ItemsCopied : 189 Warnings : 0 Errors : 0 PS C:\> Export-Report $result -Path C:\MyReports\CopyListReports.xlsx Report exported with success to: C:\MyReports\CopyListReports.xlsx