Command
Import-PropertyTemplate
Description
The command to import a property template to copy content to a SharePoint list or library.
You can export a property template from the app.
For more info, see Create a property template.
Examples
Import Property Template for a List and Copy Content with it
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $srcList = Get-List -Name "mysrclist" -Site $srcSite $dstList = Get-List -Name "mydstlist" -Site $dstSite Import-PropertyTemplate -Path "C:\MyPropertyTemplate\Template1.sgt" -List $dstList -Overwrite Copy-Content -SourceList $srcList -DestinationList $dstList -TemplateName "Template1"
Note: -TemplateName refers to the template's name and not the name of the SGT file. You can see the template name in your copy options in the area where you can export the template in the app.
Syntax
Import-PropertyTemplate-Path <String> -List <List> [-Overwrite <SwitchParameter>]
Parameters
-List <List>
Specifies the lists or libraries for which the property template will be imported.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Overwrite <SwitchParameter>
Specifies that property templates will be overwritten if they already exist.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Path <String>
Specifies the SGT file path that was previously exported with ShareGate Migrate.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |