注: PowerShellとの連携には、ShareGate MigrateのProまたはEnterpriseサブスクリプションが必要です。Essentialsプランでは利用できません。
コマンド
Set-ContentTypeMapping
説明
マッピング設定内のコンテンツ タイプ マッピングを追加または更新するコマンドです。
例
カスタム マッピングを設定する
$mappingSettings = Set-ContentTypeMapping -Source Image -Destination Picture$mappingSettings = Set-ContentTypeMapping -MappingSettings $mappingSettings -Source "Video" -Destination "Movie"$mappingSettings = Set-ContentTypeMapping -MappingSettings $mappingSettings -Source "My Custom Content Type" -Ignore$mappingSettingsPropertyMappings :ContentTypeMappings : Image -> Picture My Custom Content Type -> <NO DESTINATION> Video -> MovieUserAndGroupMappings :PermissionLevelMappings :SiteTemplateMappings :SensitivityLabelMappings :
コピー元リストとコピー先リストの既存のマッピングにカスタム マッピングを設定する
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite"$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"$srcList = Get-List -Name mysrclist -Site $srcSite$dstList = Get-List -Name mydstlist -Site $dstSite$mappingSettings = Get-ContentTypeMapping -SourceList $srcList -DestinationList $dstList$mappingSettings = Set-ContentTypeMapping -MappingSettings $mappingSettings -Source "Image" -Destination "Picture"$mappingSettings = Set-ContentTypeMapping -MappingSettings $mappingSettings -Source "Video" -Destination "Movie"$mappingSettings = Set-ContentTypeMapping -MappingSettings $mappingSettings -Source "My Custom Content Type" -Ignore$mappingSettingsPropertyMappings :ContentTypeMappings : Audio -> Audio Basic Page -> <NO DESTINATION> Document -> Document Folder -> Folder Image -> Picture My Custom Content Type -> <NO DESTINATION> Video -> MovieUserAndGroupMappings :PermissionLevelMappings :SiteTemplateMappings :SensitivityLabelMappings :
ローカル ディスク ストレージからコンテンツ タイプ マッピングを設定する
$mappingSettings = Set-ContentTypeMapping -FileFromFileSystem -Destination "CustomFileContentType"$mappingSettings = Set-ContentTypeMapping -FolderFromFileSystem -Destination "CustomFolderContentType" -MappingSettings $mappingSettings$mappingSettingsPropertyMappings :ContentTypeMappings : <File> -> CustomFileContentType <Folder> -> CustomFolderContentTypeUserAndGroupMappings :PermissionLevelMappings :SiteTemplateMappings :SensitivityLabelMappings :
構文
Set-ContentTypeMapping
-Source <String>-Destination <String> [-MappingSettings <MappingSettings>]
Set-ContentTypeMapping
-Source <String>-Ignore <SwitchParameter>[-MappingSettings <MappingSettings>]
Set-ContentTypeMapping
-FileFromFileSystem <SwitchParameter>-Destination <String> [-MappingSettings <MappingSettings>]
Set-ContentTypeMapping
-FolderFromFileSystem <SwitchParameter>-Destination <String> [-MappingSettings <MappingSettings>]
パラメーター
-Destination <String>
コピー先のコンテンツ タイプを指定します。
必須かどうか | True |
既定値 | None |
パイプライン入力を許可するか | False |
ワイルドカード文字を許可するか | False |
パラメーターセット名 | Default, DefaultFileContentType, DefaultFolderContentType |
エイリアス | None |
-FileFromFileSystem <SwitchParameter>
ファイル システムから取得したファイルの既定のコンテンツ タイプを設定することを指定します。
必須かどうか | True |
既定値 | None |
パイプライン入力を許可するか | False |
ワイルドカード文字を許可するか | False |
パラメーターセット名 | DefaultFolderContentType |
エイリアス | None |
-Ignore <SwitchParameter>
コンテンツ タイプを無視することを指定します。
必須かどうか | True |
既定値 | None |
パイプライン入力を許可するか | False |
ワイルドカード文字を許可するか | False |
パラメーターセット名 | ExplicitIgnoreDestination |
エイリアス | None |
-MappingSettings <MappingSettings>
マッピング設定を指定します。
必須かどうか | False |
既定値 | None |
パイプライン入力を許可するか | True (ByValue; ByPropertyName) |
ワイルドカード文字を許可するか | False |
パラメーターセット名 | (All) |
エイリアス | None |
-Source <String>
コピー元のコンテンツ タイプを指定します。
必須かどうか | True |
既定値 | None |
パイプライン入力を許可するか | False |
ワイルドカード文字を許可するか | False |
パラメーターセット名 | Default, ExplicitIgnoreDestination |
エイリアス | None |
この記事はAIによって翻訳されています。ご不明な点がある場合は、英語の原文をご確認ください。
