There are different copy options you can apply in your PowerShell script.
Index
Content Migration
Applies to the Copy-Content, Import-Document, Import-BoxDocument, and Import-GoogleDriveDocument commands.
Configuration and Filter Options
For your Configuration (custom permissions, preserve authors and timestamps, etc.) and Filter options (time range and file extensions) you have to define a property template or use an existing one.
Structure Migration
Configuration
When migrating with the Copy-Site or Copy-List commands, the application will try to replicate your source by default. To modify the configuration (permissions, workflows, etc.), you have to dismiss the elements you do not wish to preserve on your copy line with a switch parameter:
- -NoCustomPermissions
- -NoContent
- -NoSiteFeatures
- -NoCustomizedListForms
- -NoListViews
- -NoWorkflows
- -NoNintexWorkflowHistory
- -NoWebParts
- -NoNavigation
Example
Migrating a site with no custom permissions, no content, and no workflows:
$srcSite = Connect-Site -Url http://myfarm1/sites/mysourcesite $dstSite = Connect-Site -Url http://myfarm1/sites/mydestinationsite Copy-Site -Site $srcSite -DestinationSite $dstSite -Merge -NoCustomPermissions -NoContent -NoWorkflows
Note: There are two exceptions to this. You have to add -UserAlerts and -Subsites if you wish to keep user alerts and subsites.
To limit the number of versions, you can add -VersionLimit followed by the number of versions you wish to keep.
To force lists to use the modern experience, you can add -ForceNewListExperience.
Operation Mode
For the Operation Mode (copy and replace, copy if newer, etc.), you have to define new copy settings. This applies to all the copy commands.
Tip: You will find how to adapt your migration scripts to perform an incremental migration in the Incremental update using PowerShell article.
Insane Mode and Normal Mode
Your script will use Insane mode by default. You can overwrite the setting by adding -NormalMode to your copy line.