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

Export-UserAndGroupMapping

Export-UserAndGroupMappingのPowerShellコマンドレットリファレンス。

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

コマンド

Export-UserAndGroupMapping

説明

ユーザーとグループのマッピングをファイルにエクスポートするコマンドです。

ユーザーとグループのマッピングの詳細や、ShareGateのユーザー マッピング ファイル(SGUM)をエクスポートおよびインポートする方法については、ユーザーとグループをマッピングするを参照してください。

カスタム マッピングをエクスポートする

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

移行元サイトと移行先サイトからマッピングをエクスポートする

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

構文

Export-UserAndGroupMapping
-MappingSettings <MappingSettings>
[-Path <String>]
[-Overwrite <SwitchParameter>]

パラメーター

-MappingSettings <MappingSettings>

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

必須かどうか

True

既定値

None

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

True (ByValue, ByPropertyName)

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

False

パラメーターセット名

(All)

エイリアス

None

-Overwrite <SwitchParameter>

ファイルが既に存在する場合に上書きすることを指定します。

必須かどうか

False

既定値

None

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

False

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

False

パラメーターセット名

(All)

エイリアス

None

-Path <String>

ファイルの保存先パスを指定します。この引数を指定しない場合、マッピング ファイルの保存先は、PowerShell スクリプトを実行している場所と同じになります。

必須かどうか

False

既定値

None

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

False

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

False

パラメーターセット名

(All)

エイリアス

PSPath

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

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