Skip to main content
Import Property Template
Updated over a week ago

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 template's name 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

Did this answer your question?