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

Set-PropertyMapping

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

コマンド

Set-PropertyMapping

説明

マッピング設定内のプロパティ マッピングを追加または更新するコマンドです。

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

# Set a property mapping for multiple source columns to a single destination column
$mappingSettings = Set-PropertyMapping -Source Col1,Col2,Col3 -Destination MultipleColumn

# Display the created property mappings
$mappingSettings

# Example output:
# PropertyMappings : Col1 -> MultipleColumn
# Col2 -> ───────┘
# Col3 -> ───────┘
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :

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

# Connect to the source site and destination sites
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite"
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"

# Retrieve the source list from the source site
$srcList = Get-List -Name "mysrclist" -Site $srcSite

# Retrieve the destination list from the destination site
$dstList = Get-List -Name "mydstlist" -Site $dstSite

# Retrieve existing property mappings between the source and destination lists
$mappingSettings = Get-PropertyMapping -SourceList $srcList -DestinationList $dstList

# Add a new property mapping for multiple source columns to a single destination column
$mappingSettings = Set-PropertyMapping -MappingSettings $mappingSettings -Source Col1,Col2,Col3 -Destination MultipleColumn

# Display the updated property mappings
$mappingSettings

# Example output:
# PropertyMappings : Author -> Author
# KEY Created -> Created
# Editor -> Editor
# Modified -> Modified
# Col1 -> MultipleColumn
# Col2 -> ───────┘
# Col3 -> ───────┘
# MyCustomField -> MyCustomField
# KEY Title -> Title
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :

構文

Set-PropertyMapping
-Source <String[]>
-Destination <String>
[-Key <SwitchParameter>]
[-MappingSettings <MappingSettings>]
Set-PropertyMapping
-Ignore <SwitchParameter>
-Destination <String>
[-MappingSettings <MappingSettings>]

パラメーター

-Destination <String>

移行先のプロパティを指定します。

必須かどうか

True

既定値

None

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

False

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

False

パラメーターセット名

(All)

エイリアス

None

-Ignore <SwitchParameter>

プロパティを無視するように指定します。

必須かどうか

True

既定値

None

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

False

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

False

パラメーターセット名

ExplicitIgnore

エイリアス

None

-Key <SwitchParameter>

マッピングがキーであるかどうかを指定します。

必須かどうか

False

既定値

None

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

False

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

False

パラメーターセット名

Default

エイリアス

None

-MappingSettings <MappingSettings>

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

必須かどうか

False

既定値

None

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

True (ByValue, ByPropertyName)

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

False

パラメーターセット名

(All)

エイリアス

None

-Source <String[]>

移行元のプロパティを指定します。

必須かどうか

True

既定値

None

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

False

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

False

パラメーターセット名

Default

エイリアス

None

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

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