Zum Hauptinhalt springen

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

Import-UserAndGroupMapping

Beschreibung

Der Befehl zum Importieren der Benutzer- und Gruppenzuordnungen aus einer 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

Zuordnungen aus einer Datei importieren

# Import the user and group mapping from the specified file
$mappingSettings = Import-UserAndGroupMapping -Path "C:\MyMappings\MyUserAndGroupMappingsFileName.sgum"

# Display the imported mapping settings
$mappingSettings
# Output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings : CustomPermissions Members -> Sales&Marketing Owners
# i:0#.w|office\sg.achille -> i:0#.w|office\sg.baptiste
# i:0#.w|office\sg.camille -> i:0#.w|office\sg.denis
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :

Zuordnungen mit Zuordnungen aus einer Datei zusammenführen

# Create and update user and group mappings
$mappingSettings = Set-UserAndGroupMapping -Source "John Doe" -Destination "Paul Smith"

$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"

# Import additional mappings from the specified file, merging with the current settings
$mappingSettings = Import-UserAndGroupMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyUserAndGroupMappingsFileName.sgum"

# Display the final mapping settings
$mappingSettings

# Output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings : <Unresolved users or groups> -> Old employee Group
# CustomPermissions Members -> Sales&Marketing Owners
# i:0#.w|office\sg.achille -> i:0#.w|office\sg.baptiste
# i:0#.w|office\sg.camille -> i:0#.w|office\sg.denis
# John Doe -> Paul Smith
# myusername -> anotherusername
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :

Syntax

Import-UserAndGroupMapping-Path <String> [-MappingSettings <MappingSettings>]

Parameter

-MappingSettings <MappingSettings>

Gibt die Zuordnungseinstellungen an. Mit diesem Befehl können einem vorhandenen Zuordnungseinstellungsobjekt mehrere Zuordnungseinstellungen hinzugefügt werden. Weitere Informationen finden Sie unter Mehrere Zuordnungsdateien gleichzeitig verwenden.

Erforderlich?

False

Standardwert

None

Pipelineeingabe zulässig?

True (ByValue, ByPropertyName)

Platzhalterzeichen zulässig?

False

Parametersatzname

(All)

Aliase

None

-Path <String>

Gibt den Dateipfad an, der zuvor mit ShareGate exportiert wurde.

Erforderlich?

True

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?