Command
Copy-List
Description
The PowerShell command used to copy a list or library from one SharePoint site to another.
Tips:
To learn how to adapt your Copy-Site script to perform an incremental migration, see Run an incremental migration in PowerShell.
To learn how to use copy options with PowerShell, see Copy options in PowerShell.
Examples
Get Lists to Copy
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $toCopy = Get-List -Site $srcSite Copy-List -List $toCopy -DestinationSite $dstSite
Copy All Lists
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Copy-List -All -SourceSite $srcSite -DestinationSite $dstSite
Copy Some Lists
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Copy-List -SourceSite $srcSite -Name MyTitle*,MySpecificTitle -DestinationSite $dstSite
Note: The * symbol is used to call multiple objects with a similar name.
Copy All Lists Pre-Check
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Copy-List -All -SourceSite $srcSite -DestinationSite $dstSite -WhatIf
Copy and Rename One List
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Copy-List -SourceSite $srcSite -Name MyTitle*,MySpecificTitle -DestinationSite $dstSite -ListTitleUrlSegment "MyTitleNewUrl" -ListTitle "MyNewTitle"
Note: The * symbol is used to call multiple objects with a similar name.
Syntax
Copy-List
-List <List[]>
-DestinationSite <Site>
[-ListTitle <String>]
[-ListTitleUrlSegment <String>]
[-NoContent <SwitchParameter>]
[-VersionLimit <Int32>]
[-NoCustomPermissions <SwitchParameter>]
[-NoWorkflows <SwitchParameter>]
[-NoSiteFeatures <SwitchParameter>]
[-NoWebParts <SwitchParameter>]
[-NoCustomizedListForms <SwitchParameter>]
[-NoListViews <SwitchParameter>]
[-NoNintexWorkflowHistory <SwitchParameter>]
[-UserAlerts <SwitchParameter>]
[-NormalMode <SwitchParameter>]
[-WaitForImportCompletion <SwitchParameter>]
[-ForceNewListExperience <SwitchParameter>]
[-WhatIf <SwitchParameter>]
[-CopySettings <CopySettings>]
[-MappingSettings <MappingSettings>]
[-TaskName <String>]
Copy-List
-Name <String[]>
-SourceSite <Site>
-DestinationSite <Site>
[-ListTitle <String>]
[-ListTitleUrlSegment <String>]
[-NoContent <SwitchParameter>]
[-VersionLimit <Int32>]
[-NoCustomPermissions <SwitchParameter>]
[-NoWorkflows <SwitchParameter>]
[-NoSiteFeatures <SwitchParameter>]
[-NoWebParts <SwitchParameter>]
[-NoCustomizedListForms <SwitchParameter>]
[-NoListViews <SwitchParameter>]
[-NoNintexWorkflowHistory <SwitchParameter>]
[-UserAlerts <SwitchParameter>]
[-NormalMode <SwitchParameter>]
[-WaitForImportCompletion <SwitchParameter>]
[-ForceNewListExperience <SwitchParameter>]
[-WhatIf <SwitchParameter>]
[-CopySettings <CopySettings>]
[-MappingSettings <MappingSettings>]
[-TaskName <String>]
Copy-List
-All <SwitchParameter>
-SourceSite <Site>
-DestinationSite <Site>
[-ListTitle <String>]
[-ListTitleUrlSegment <String>]
[-NoContent <SwitchParameter>]
[-VersionLimit <Int32>]
[-NoCustomPermissions <SwitchParameter>]
[-NoWorkflows <SwitchParameter>]
[-NoSiteFeatures <SwitchParameter>]
[-NoWebParts <SwitchParameter>]
[-NoCustomizedListForms <SwitchParameter>]
[-NoListViews <SwitchParameter>]
[-NoNintexWorkflowHistory <SwitchParameter>]
[-UserAlerts <SwitchParameter>]
[-NormalMode <SwitchParameter>]
[-WaitForImportCompletion <SwitchParameter>]
[-ForceNewListExperience <SwitchParameter>]
[-WhatIf <SwitchParameter>]
[-CopySettings <CopySettings>]
[-MappingSettings <MappingSettings>]
[-TaskName <String>]
Parameters
-All <SwitchParameter>
Specifies that they all be copied.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | All |
Aliases | None |
-CopySettings <CopySettings>
Specifies the copy settings.
Required? | False |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-DestinationSite <Site>
Specifies the destination site.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-ForceNewListExperience <SwitchParameter>
Specifies that the command will convert lists to the New Microsoft 365 Experience when possible.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-List <List[]>
Specifies the source lists or libraries to copy.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | Default |
Aliases | None |
-ListTitle <String>
Specifies the new list title. This parameter must be used with the 'ListTitleUrlSegment' parameter and can not be used when copying more than one list.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-ListTitleUrlSegment <String>
Specifies the new list URL. This parameter must be used with the 'ListTitle' parameter and can not be used when copying more than one list.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Name <String[]>
Specifies the name (Wildcards supported).
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | True |
Parameter set name | Name |
Aliases | None |
-NoContent <SwitchParameter>
Specifies that all list items, documents, folders and document sets inside the lists and libraries won't be copied.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoCustomizedListForms <SwitchParameter>
Specifies that customized list forms and content type forms won't be copied.
Required? | False |
Default value | None |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoCustomPermissions <SwitchParameter>
Specifies that everything will be set to inherit permission from its parent.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoListViews <SwitchParameter>
Specifies that list views won't be copied.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoNintexWorkflowHistory <SwitchParameter>
Specifies that the history for Nintex workflows associated with the migrated objects won't be copied to the destination.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NormalMode <SwitchParameter>
Specifies that the normal mode should be used.
Note: Insane mode is always used by default in PowerShell.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoSiteFeatures <SwitchParameter>
Specifies that all the site and site collection features that are required by the elements being copied won't be automatically activated.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoWebParts <SwitchParameter>
Specifies that the web parts won't be copied when copying pages.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoWorkflows <SwitchParameter>
Specifies that the workflows associated with the migrated objects won't be copied to the destination.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-SourceSite <Site>
Specifies the source site.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | Name, All |
Aliases | None |
-TaskName <String>
Specifies a name for the task.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-UserAlerts <SwitchParameter>
Specifies that the User Alerts associated with the migrated objects will be copied to the destination.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-VersionLimit <Int32>
Specifies to copy the X latest version, while conserving at least one Major version.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-WaitForImportCompletion <SwitchParameter>
Specifies that the command will wait for azure insane mode import to be completed.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-WhatIf <SwitchParameter>
Specifies that a pre-check will be executed instead of a migration. For more information, see Run a Pre-Check in PowerShell.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |