Zum Hauptinhalt springen

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

Set-UserAndGroupMapping

Beschreibung

Der Befehl zum Hinzufügen oder Aktualisieren einer Benutzer- oder Gruppenzuordnung in den Zuordnungseinstellungen.

Beispiele

Benutzerdefinierte Zuordnungen festlegen

# Create or update the user and group mapping
$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"

# Display the current mapping settings
$mappingSettings
# Output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings : <Unresolved users or groups> -> Old employee Group
# John Doe -> Paul Smith
# myusername -> anotherusername
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :

Benutzerdefinierte Zuordnungen auf vorhandene Zuordnungen einer Quell- und Zielliste anwenden

# 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 current user and group mapping settings
$mappingSettings = Get-UserAndGroupMapping -SourceSite $srcSite -DestinationSite $dstSite

# Update the mapping to include "John Doe" -> "Paul Smith"
$mappingSettings = Set-UserAndGroupMapping -MappingSettings $mappingSettings -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"

# 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

Set-UserAndGroupMapping
-Source <String>
-Destination <String>
[-MappingSettings <MappingSettings>]
Set-UserAndGroupMapping
-Source <String>
-Ignore <SwitchParameter>
[-MappingSettings <MappingSettings>]
Set-UserAndGroupMapping
-Source <String>
-UnresolvedUserOrGroup <SwitchParameter>
-Destination <String>
[-MappingSettings <MappingSettings>]

Parameter

-Destination <String>

Gibt den Zielbenutzer oder die Zielgruppe an.

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

False

Platzhalterzeichen zulässig?

False

Parametersatzname

Default, Unresolved

Aliase

None

-Ignore <SwitchParameter>

Gibt an, dass der Benutzer oder die Gruppe ignoriert werden soll.

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

False

Platzhalterzeichen zulässig?

False

Parametersatzname

ExplicitIgnore

Aliase

None

-MappingSettings <MappingSettings>

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

True (ByValue, ByPropertyName)

Platzhalterzeichen zulässig?

False

Parametersatzname

(All)

Aliase

None

-Source <String>

Gibt den Quellbenutzer oder die Quellgruppe an.

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

False

Platzhalterzeichen zulässig?

False

Parametersatzname

Default, ExplicitIgnore

Aliase

None

-UnresolvedUserOrGroup <SwitchParameter>

Gibt an, dass nicht aufgelöste Benutzer oder Gruppen als Quelle verwendet werden.

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

False

Platzhalterzeichen zulässig?

False

Parametersatzname

Unresolved

Aliase

None

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

Hat dies deine Frage beantwortet?