Hinweis: Für die PowerShell-Integration ist ein ShareGate Migrate Pro- oder Enterprise-Abonnement erforderlich. Sie ist im Essentials-Plan nicht verfügbar.
Befehl
Set-PropertyMapping
Beschreibung
Der Befehl fügt eine Eigenschaftenzuordnung in den Zuordnungseinstellungen hinzu oder aktualisiert sie.
Beispiele
Benutzerdefinierte Zuordnungen festlegen
# Set a property mapping for multiple source columns to a single destination column
$mappingSettings = Set-PropertyMapping -Source Col1,Col2,Col3 -Destination MultipleColumn
# Display the created property mappings
$mappingSettings
# Example output:
# PropertyMappings : Col1 -> MultipleColumn
# Col2 -> ───────┘
# Col3 -> ───────┘
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :
Benutzerdefinierte Zuordnungen für vorhandene Zuordnungen aus einer Quellliste und einer Zielliste festlegen
# Connect to the source site and destination sites
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite"
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"
# Retrieve the source list from the source site
$srcList = Get-List -Name "mysrclist" -Site $srcSite
# Retrieve the destination list from the destination site
$dstList = Get-List -Name "mydstlist" -Site $dstSite
# Retrieve existing property mappings between the source and destination lists
$mappingSettings = Get-PropertyMapping -SourceList $srcList -DestinationList $dstList
# Add a new property mapping for multiple source columns to a single destination column
$mappingSettings = Set-PropertyMapping -MappingSettings $mappingSettings -Source Col1,Col2,Col3 -Destination MultipleColumn
# Display the updated property mappings
$mappingSettings
# Example output:
# PropertyMappings : Author -> Author
# KEY Created -> Created
# Editor -> Editor
# Modified -> Modified
# Col1 -> MultipleColumn
# Col2 -> ───────┘
# Col3 -> ───────┘
# MyCustomField -> MyCustomField
# KEY Title -> Title
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :
Syntax
Set-PropertyMapping
-Source <String[]>
-Destination <String>
[-Key <SwitchParameter>]
[-MappingSettings <MappingSettings>]
Set-PropertyMapping
-Ignore <SwitchParameter>
-Destination <String>
[-MappingSettings <MappingSettings>]
Parameter
-Destination <String>
Gibt die Zieleigenschaft an.
Erforderlich? | True |
Standardwert | None |
Pipelineeingabe zulässig? | False |
Platzhalterzeichen zulässig? | False |
Parametersatzname | (All) |
Aliase | None |
-Ignore <SwitchParameter>
Gibt an, dass die Eigenschaft ignoriert werden soll.
Erforderlich? | True |
Standardwert | None |
Pipelineeingabe zulässig? | False |
Platzhalterzeichen zulässig? | False |
Parametersatzname | ExplicitIgnore |
Aliase | None |
-Key <SwitchParameter>
Gibt an, ob die Zuordnung ein Schlüssel ist.
Erforderlich? | False |
Standardwert | None |
Pipelineeingabe zulässig? | False |
Platzhalterzeichen zulässig? | False |
Parametersatzname | Default |
Aliase | None |
-MappingSettings <MappingSettings>
Gibt die Zuordnungseinstellungen an.
Erforderlich? | False |
Standardwert | None |
Pipelineeingabe zulässig? | True (ByValue, ByPropertyName) |
Platzhalterzeichen zulässig? | False |
Parametersatzname | (All) |
Aliase | None |
-Source <String[]>
Gibt die Quelleigenschaften an.
Erforderlich? | True |
Standardwert | None |
Pipelineeingabe zulässig? | False |
Platzhalterzeichen zulässig? | False |
Parametersatzname | Default |
Aliase | None |
Dieser Artikel wurde mit künstlicher Intelligenz übersetzt. Bei Unklarheiten konsultieren Sie bitte die englische Originalversion.
