メインコンテンツにスキップ

Set-UserAndGroupMapping

注: PowerShellとの連携には、ShareGate MigrateのProまたはEnterpriseサブスクリプションが必要です。Essentialsプランでは利用できません。

コマンド

Set-UserAndGroupMapping

説明

マッピング設定内のユーザーまたはグループのマッピングを追加または更新するコマンドです。

カスタム マッピングを設定する

# 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 :

移行元リストと移行先リストの既存のマッピングにカスタム マッピングを設定する

# 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 :

構文

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

パラメーター

-Destination <String>

移行先のユーザーまたはグループを指定します。

必須かどうか

True

既定値

None

パイプライン入力を許可するか

False

ワイルドカード文字を許可するか

False

パラメーターセット名

Default, Unresolved

エイリアス

None

-Ignore <SwitchParameter>

ユーザーまたはグループを無視するように指定します。

必須かどうか

True

既定値

None

パイプライン入力を許可するか

False

ワイルドカード文字を許可するか

False

パラメーターセット名

ExplicitIgnore

エイリアス

None

-MappingSettings <MappingSettings>

マッピング設定を指定します。

必須かどうか

True

既定値

None

パイプライン入力を許可するか

True (ByValue, ByPropertyName)

ワイルドカード文字を許可するか

False

パラメーターセット名

(All)

エイリアス

None

-Source <String>

移行元のユーザーまたはグループを指定します。

必須かどうか

True

既定値

None

パイプライン入力を許可するか

False

ワイルドカード文字を許可するか

False

パラメーターセット名

Default, ExplicitIgnore

エイリアス

None

-UnresolvedUserOrGroup <SwitchParameter>

移行元として未解決のユーザーまたはグループを使用するように指定します。

必須かどうか

True

既定値

None

パイプライン入力を許可するか

False

ワイルドカード文字を許可するか

False

パラメーターセット名

Unresolved

エイリアス

None

この記事はAIによって翻訳されています。ご不明な点がある場合は、英語の原文をご確認ください。

こちらの回答で解決しましたか?