Zum Hauptinhalt springen

Import-UserAndGroupMapping

Importieren Sie mit PowerShell Benutzer- und Gruppenzuordnungen aus einer SGUM-Datei

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 importiert die Benutzer- und Gruppenzuordnungen aus einer Datei.

Weitere Informationen zu Ihren Benutzer- und Gruppenzuordnungen sowie zum Exportieren und Importieren einer ShareGate-Benutzerzuordnungsdatei (SGUM) finden Sie unter Map users and groups.

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 Sie einem vorhandenen Zuordnungseinstellungsobjekt mehrere Zuordnungseinstellungen hinzufügen. Weitere Details finden Sie unter Mehrere Zuordnungsdateien gleichzeitig verwenden.

Erforderlich?

False

Standardwert

None

Pipelineeingaben akzeptieren?

True (ByValue, ByPropertyName)

Platzhalterzeichen akzeptieren?

False

Parametersatzname

(All)

Aliase

None

-Path <String>

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

Erforderlich?

True

Standardwert

None

Pipelineeingaben akzeptieren?

False

Platzhalterzeichen akzeptieren?

False

Parametersatzname

(All)

Aliase

PSPath

Dieser Artikel wurde mithilfe künstlicher Intelligenz übersetzt. Wenden Sie sich im Zweifelsfall an die englische Originalversion.

Hat dies deine Frage beantwortet?