Zum Hauptinhalt springen

Export-PropertyMapping

Hinweis: Für die PowerShell-Integration ist ein ShareGate Migrate Pro- oder Enterprise-Abonnement erforderlich. Sie ist im Essentials-Plan nicht verfügbar.

Befehl

Export-PropertyMapping

Beschreibung

Der Befehl zum Exportieren der Eigenschaftenzuordnungen in eine Datei.

Beispiele

Benutzerdefinierte Zuordnungen exportieren

# Set the initial property mapping
# Map "My Old Title" from the source to "Title" in the destination
$mappingSettings = Set-PropertyMapping -Source "My Old Title" -Destination "Title"

# Add a property mapping for multiple source columns to a single destination column
# Map "Col1", "Col2", and "Col3" to "MultipleColumn"
$mappingSettings = Set-PropertyMapping -MappingSettings $mappingSettings -Source Col1,Col2,Col3 -Destination "MultipleColumn"

# Add a property mapping for a custom field
# Map "SourceCustomField" to "MyCustomField"
$mappingSettings = Set-PropertyMapping -MappingSettings $mappingSettings -Source "SourceCustomField" -Destination "MyCustomField"

# Export the property mappings to a file
# The mappings will be saved in the specified file path
Export-PropertyMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyPropertyMappingsFileName"

# Output message confirming successful export
# Example output:
# The property mappings exported with success to: C:\MyMappings\MyPropertyMappingsFileName.sgpm

Zuordnungen aus einer Quell- und Zielliste exportieren

# Connect to the source 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

# Export the retrieved property mappings to a file
Export-PropertyMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyPropertyMappingsFileName"

# Example output message
# The property mappings exported with success to: C:\MyMappings\MyPropertyMappingsFileName.sgpm

Syntax

Export-PropertyMapping
-MappingSettings <MappingSettings>
[-Path <String>]
[-Overwrite <SwitchParameter>]

Parameter

-MappingSettings <MappingSettings>

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

True (ByValue, ByPropertyName)

Platzhalterzeichen zulässig?

False

Parametersatzname

(All)

Aliase

None

-Overwrite <SwitchParameter>

Gibt an, dass die Datei überschrieben wird, falls sie bereits vorhanden ist.

Erforderlich?

False

Standardwert

None

Pipelineeingabe zulässig?

False

Platzhalterzeichen zulässig?

False

Parametersatzname

(All)

Aliase

None

-Path <String>

Gibt den Pfad an, unter dem die Datei gespeichert werden soll.

Erforderlich?

False

Standardwert

None

Pipelineeingabe zulässig?

False

Platzhalterzeichen zulässig?

False

Parametersatzname

(All)

Aliase

PSPath

Dieser Artikel wurde mit künstlicher Intelligenz übersetzt. Bei Unklarheiten konsultieren Sie bitte die englische Originalversion.

Hat dies deine Frage beantwortet?