Skip to main content
Set Property Mapping
Updated this week

Command

Set-PropertyMapping

Description

The command to add or update a property mapping in the mapping settings.

Index

Examples

Set custom mappings

$mappingSettings = Set-PropertyMapping -Source Col1,Col2,Col3 -Destination MultipleColumn 
$mappingSettings  
PropertyMappings        : Col1          -> MultipleColumn
                          Col2          -> ───────┘
                          Col3          -> ───────┘ 
ContentTypeMappings     : 
UserAndGroupMappings    : 
PermissionLevelMappings : 
SiteTemplateMappings    :

Set custom mappings on existing mappings from a source list and a destination list

$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 
$mappingSettings = Get-PropertyMapping -SourceList $srcList -DestinationList $dstList 
$mappingSettings = Set-PropertyMapping -MappingSettings $mappingSettings -Source Col1,Col2,Col3 -Destination MultipleColumn 
$mappingSettings  
PropertyMappings        :     Author        -> Author
                          KEY Created       -> Created
                              Editor        -> Editor
                              Modified      -> Modified
                              Col1          -> MultipleColumn
                              Col2          -> ───────┘
                              Col3          -> ───────┘
                              MyCustomField -> MyCustomField
                          KEY Title         -> Title 
ContentTypeMappings     : 
UserAndGroupMappings    : 
PermissionLevelMappings : 
SiteTemplateMappings    :

Syntax

Set-PropertyMapping-Source <String[]>
-Destination <String>
[-Key <SwitchParameter>] 
[-MappingSettings <MappingSettings>]
Set-PropertyMapping-Ignore <SwitchParameter>
-Destination <String>
[-MappingSettings <MappingSettings>]

Parameters

-Destination <String>

Specifies the destination property.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-Ignore <SwitchParameter>

Specifies to ignore the property.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

ExplicitIgnore

Aliases

None

-Key <SwitchParameter>

Specifies if the mapping is a key.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

Default

Aliases

None

-MappingSettings <MappingSettings>

Specifies the mapping settings.

Required?

False

Default value

None

Accept pipeline input?

True (ByValue, ByPropertyName)

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-Source <String[]>

Specifies the source properties.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

Default

Aliases

None

Did this answer your question?