Name
Set-PropertyMapping
SYNTAX
Set-PropertyMapping [-Source] <String[]> [-Destination] <String> [[-Key] <SwitchParameter>] [[-MappingSettings] <MappingSettings>]
Set-PropertyMapping [-Ignore] <SwitchParameter> [-Destination] <String> [[-MappingSettings] <MappingSettings>]
DESCRIPTION
The command to add or update a property mapping in the mapping settings.
PARAMETERS
-Destination <String>
Specifies the destination property.
Required? | True |
Position? | 2 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Ignore <SwitchParameter>
Specifies to ignore the property.
Required? | True |
Position? | 1 |
Default value | |
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 |
Position? | 3 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | Default |
Aliases | None |
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | False |
Position? | 0 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Source <String[]>
Specifies the source properties.
Required? | True |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | Default |
Aliases | None |
INPUTS
MappingSettings
OUTPUTS
MappingSettings
The resulting mapping settings after the operation.
EXAMPLES
-------------- Example: Set custom mappings --------------
$mappingSettings = Set-PropertyMapping -Source Col1,Col2,Col3 -Destination MultipleColumn $mappingSettings PropertyMappings : Col1 -> MultipleColumn Col2 -> ───────┘ Col3 -> ───────┘ ContentTypeMappings : UserAndGroupMappings : PermissionLevelMappings : SiteTemplateMappings :
-------------- Example: 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 :
Comments
0 comments
Please sign in to leave a comment.