Skip to main content
Remove Content Type Mapping
Updated over 3 months ago

Command

Remove-ContentTypeMapping

Description

The command to remove a content type mapping.

Examples

Remove mappings

# Set a content type mapping from "Image" to "Picture"
$mappingSettings = Set-ContentTypeMapping -Source Image -Destination Picture

# Add a content type mapping from "Video" to "Movie"
$mappingSettings = Set-ContentTypeMapping -MappingSettings $mappingSettings -Source Video -Destination Movie

# Add a content type mapping for "My Custom Content Type" to ignore its destination
$mappingSettings = Set-ContentTypeMapping -MappingSettings $mappingSettings -Source "My Custom Content Type" -Ignore

# Remove the content type mapping for "Image"
Remove-ContentTypeMapping -MappingSettings $mappingSettings -Source Image

# Display the updated content type mappings
$mappingSettings

# Example output:
# PropertyMappings :
# ContentTypeMappings : My Custom Content Type -> <NO DESTINATION>
# Video -> Movie
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :

Syntax

Remove-ContentTypeMapping-MappingSettings <MappingSettings>
-Source <String>
Remove-ContentTypeMapping-MappingSettings <MappingSettings>
-FileFromFileSystem <SwitchParameter>
Remove-ContentTypeMapping 
-MappingSettings <MappingSettings>
-FolderFromFileSystem <SwitchParameter>

Parameters

-FileFromFileSystem <SwitchParameter>

Specifies to remove the default content type for files coming from the file system.

Required?

True

Default value

Accept pipeline input?

false

Accept wildcard characters?

False

Parameter set name

DefaultFileContentType

Aliases

None

-FolderFromFileSystem <SwitchParameter>

Specifies to remove the default content type for folders coming from the file system.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

DefaultFolderContentType

Aliases

None

-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

-Source <String>

Specifies the source content type.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

Default

Aliases

None

Did this answer your question?