NAME
Export-ContentTypeMapping
SYNTAX
Export-ContentTypeMapping [-MappingSettings] <MappingSettings> [[-Path] <String>] [[-Overwrite] <SwitchParameter>]
DESCRIPTION
The command to export the content type mappings to a file.
PARAMETERS
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | True |
Position? | 0 |
Default value | |
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 |
Position? | 2 |
Default value | |
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 |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |
INPUTS
MappingSettings
OUTPUTS
String
The export result.
EXAMPLES
-------------- Example: 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"
-------------- Example: 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"
Comments
0 comments
Please sign in to leave a comment.