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

Export-UserAndGroupMapping

PowerShell を使用して、ShareGate Migrate のユーザーとグループのマッピングを SGUM ファイルとしてエクスポートします。

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

Command

Export-UserAndGroupMapping

Description

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

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

Examples

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

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

Syntax

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

Parameters

-MappingSettings <MappingSettings>

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

必須

True

既定値

なし

パイプライン入力を受け付けますか?

True (ByValue, ByPropertyName)

ワイルドカード文字を受け付けますか?

False

パラメーター セット名

(All)

エイリアス

なし

-Overwrite <SwitchParameter>

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

必須

False

既定値

なし

パイプライン入力を受け付けますか?

False

ワイルドカード文字を受け付けますか?

False

パラメーター セット名

(All)

エイリアス

なし

-Path <String>

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

必須

False

既定値

なし

パイプライン入力を受け付けますか?

False

ワイルドカード文字を受け付けますか?

False

パラメーター セット名

(All)

エイリアス

PSPath

この記事は人工知能を使用して翻訳されました。疑問がある場合は、元の英語版をご確認ください。

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