Command
Export-ContentTypeMapping
Description
The command to export the content type mappings to a file.
Index
Examples
Export custom mappings
$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 Export-ContentTypeMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyContentTypeMappingsFileName"
Export 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 Export-ContentTypeMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyContentTypeMappingsFileName"
Syntax
Export-ContentTypeMapping-MappingSettings <MappingSettings> [-Path <String>] [-Overwrite <SwitchParameter>]
Parameters
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Overwrite <SwitchParameter>
Specifies that file will be overwritten if already exist.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Path <String>
Specifies the path where you want to save the file.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |