Zum Hauptinhalt springen

Export-UserAndGroupMapping

PowerShell-Cmdlet-Referenz für Export-UserAndGroupMapping.

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-UserAndGroupMapping

Beschreibung

Der Befehl exportiert die Benutzer- und Gruppenzuordnungen in eine Datei.

Weitere Informationen zu Ihren Benutzer- und Gruppenzuordnungen und dazu, wie Sie eine ShareGate-Benutzerzuordnungsdatei (SGUM) exportieren und importieren, finden Sie unter Benutzer und Gruppen zuordnen.

Beispiele

Benutzerdefinierte Zuordnungen exportieren

# Set the user and group mapping for "John Doe" -> "Paul Smith"
$mappingSettings = Set-UserAndGroupMapping -Source "John Doe" -Destination "Paul Smith"

# Update the mapping to include "myusername" -> "anotherusername"
$mappingSettings = Set-UserAndGroupMapping -MappingSettings $mappingSettings -Source "myusername" -Destination "anotherusername"

# Map unresolved users or groups to "Old employee Group"
$mappingSettings = Set-UserAndGroupMapping -MappingSettings $mappingSettings -UnresolvedUserOrGroup -Destination "Old employee Group"

# Export the final mapping settings to the specified file
Export-UserAndGroupMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyUserAndGroupMappingsFileName"

Zuordnungen aus einer Quellsite und einer Zielsite 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 existing user and group mappings
$mappingSettings = Get-UserAndGroupMapping -SourceSite $srcSite -DestinationSite $dstSite

# Export the current mappings to a local file
Export-UserAndGroupMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyUserAndGroupMappingsFileName"

Syntax

Export-UserAndGroupMapping
-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. Wenn dieses Argument nicht angegeben wird, entspricht der Speicherort der Zuordnungsdatei dem Ort, an dem Sie das PowerShell-Skript ausführen.

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?