Skip to main content

Get Content Type Mapping

Note: PowerShell integration requires a ShareGate Migrate Pro or Enterprise subscription. It is not available on the Essentials plan.

Command

Get-ContentTypeMapping

Description

The command to get the content type mappings from a source and destination list pair.

Examples

Get mappings from a source list and a destination list

$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  PropertyMappings        : ContentTypeMappings     : Audio      -> Audio                          Basic Page -> <NO DESTINATION>                          Document   -> Document                          Folder     -> Folder                          Image      -> <NO DESTINATION>                          Video      -> <NO DESTINATION>  UserAndGroupMappings    : PermissionLevelMappings : SiteTemplateMappings    : SensitivityLabelMappings :

Get mappings from the file system and a destination list

$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"$dstList = Get-List -Name mydstlist -Site $dstSite $mappingSettings = Get-ContentTypeMapping -FromFileSystem -DestinationList $dstList $mappingSettings  PropertyMappings        : ContentTypeMappings     : <File>   -> Document                          <Folder> -> Folder  UserAndGroupMappings    : PermissionLevelMappings : SiteTemplateMappings    : SensitivityLabelMappings :

Merge mappings with mappings from a source list and a destination list

$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 $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 -MappingSettings $mappingSettings -SourceList $srcList -DestinationList $dstList $mappingSettings  PropertyMappings        : ContentTypeMappings     : Audio                  -> Audio                          Basic Page             -> <NO DESTINATION>                          Document               -> Document                          Folder                 -> Folder                          Image                  -> Picture                          My Custom Content Type -> <NO DESTINATION>                          Video                  -> Movie  UserAndGroupMappings    : PermissionLevelMappings : SiteTemplateMappings    : SensitivityLabelMappings :

Syntax

Get-ContentTypeMapping
-SourceList <List> -DestinationList <List> [-MappingSettings <MappingSettings>]
Get-ContentTypeMapping
-FromFileSystem <SwitchParameter>-DestinationList <List> [-MappingSettings <MappingSettings>]

Parameters

-DestinationList <List>

Specifies the destination list.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-FromFileSystem <SwitchParameter>

Specifies that the source is the file system.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

FileSystem

Aliases

None

-MappingSettings <MappingSettings>

Specifies the mapping settings.

Required?

False

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-SourceList <List>

Specifies the source list.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

Default

Aliases

None

Did this answer your question?