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.
- After you've launched Sharegate, the first thing you'll see is the Home Screen. To start a migration, click the "Launch Migration" button.
- You can launch a PowerShell Window and type Import-Module Sharegate.
PS C:\> Import-Module Sharegate
Or, you can launch PowerShell with Sharegate that will automatically import the Sharegate module.
- Connect to your source SharePoint site (see Connect-Site).
PS C:\> $srcSite = Connect-Site -Url http://myfarm1/sites/mysourcesite
- Connect to your destination SharePoint site (see Connect-Site).
PS C:\> $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).
PS C:\> $srcList = Get-List -Site $srcSite -name Documents
- Copy the lists and libraries to the destination site (see Copy-List)
PS C:\> $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).
PS C:\> $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