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

Get-PropertyMapping

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

コマンド

Get-PropertyMapping

説明

移行元リストと移行先リストのペアからプロパティ マッピングを取得するコマンドです。

移行元リストと移行先リストからマッピングを取得する

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

# Display the retrieved property mappings
$mappingSettings

# Example output:
# PropertyMappings : Author -> Author
# KEY Created -> Created
# Editor -> Editor
# Modified -> Modified
# <NO SOURCE> -> MultipleColumn
# MyCustomField -> MyCustomField
# KEY Title -> Title
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :

ファイルシステムと移行先リストからマッピングを取得する

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

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

# Load property mappings from a file system and associate them with the destination list
$mappingSettings = Get-PropertyMapping -FromFileSystem -DestinationList $dstList

# Display the retrieved property mappings
$mappingSettings

# Example output:
# PropertyMappings : Author -> Author
# KEY Created -> Created
# Editor -> Editor
# Modified -> Modified
# <NO SOURCE> -> MultipleColumn
# <NO SOURCE> -> MyCustomField
# KEY Title -> Title
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :

移行元リストと移行先リストのマッピングとマージする

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

# 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 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 the property mappings, merging the initial mapping settings with the source and destination lists
$mappingSettings = Get-PropertyMapping -MappingSettings $mappingSettings -SourceList $srcList -DestinationList $dstList

# Display the final 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 :

Box と移行先リストからマッピングを取得する

# Connect to the Box environment using an admin account
$box = Connect-Box -Email [email protected] -Admin

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

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

# Retrieve property mappings between the Box environment and the destination list
$mappingSettings = Get-PropertyMapping -Box $box -DestinationList $dstList

# Display the retrieved property mappings
$mappingSettings

# Example output:
# PropertyMappings : Author -> Author
# KEY Created -> Created
# Editor -> Editor
# Modified -> Modified
# MetadataTemplate_Text -> MetadataTemplate_Text
# <NO SOURCE> -> MyCustomField
# KEY Title -> Title
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings :

構文

Get-PropertyMapping
-SourceList <List>
-DestinationList <List>
[-MappingSettings <MappingSettings>]
Get-PropertyMapping
-FromFileShare <SwitchParameter>
-DestinationList <List>
[-MappingSettings <MappingSettings>]
Get-PropertyMapping
-Box <BoxInfo>
-DestinationList <List>
[-MappingSettings <MappingSettings>]

パラメーター

-Box <BoxInfo>

移行元の Box を指定します。

必須かどうか

True

既定値

None

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

True (ByValue, ByPropertyName)

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

False

パラメーターセット名

Box

エイリアス

None

-DestinationList <List>

移行先のリストを指定します。

必須かどうか

True

既定値

None

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

False

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

False

パラメーターセット名

(All)

エイリアス

None

-FromFileSystem <SwitchParameter>

移行元がファイルシステムであることを指定します。

必須かどうか

True

既定値

None

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

False

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

False

パラメーターセット名

FileSystem

エイリアス

None

-MappingSettings <MappingSettings>

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

必須かどうか

False

既定値

None

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

True (ByValue, ByPropertyName)

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

False

パラメーターセット名

(All)

エイリアス

None

-SourceList <List>

移行元のリストを指定します。

必須かどうか

True

既定値

None

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

False

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

False

パラメーターセット名

Default

エイリアス

None

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

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