Command
Import-PropertyTemplate
Description
The command to import a property template to copy data to a SharePoint a list or a library.
Index
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 name of the template and not the name of the sgt file. You can see the template name in your copy options within the app, at the left of the area where you can export the template.
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 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 Desktop.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |