Command
Import-ContentTypeMapping
Description
The command to import the content type mappings from a file.
Note: You cannot create a template using PowerShell, but you can create one in the app, export it, then import it in PowerShell using the following script.
Index
Examples
Import mappings from file
$mappingSettings = Import-ContentTypeMapping -Path "C:\MyMappings\MyContentTypeMappingsFileName.sgctm" $mappingSettings PropertyMappings : ContentTypeMappings : Audio -> Audio Basic Page -> <NO DESTINATION> Document -> Document Folder -> Folder Image -> <NO DESTINATION> Video -> <NO DESTINATION> UserAndGroupMappings : PermissionLevelMappings : SiteTemplateMappings :
Merge mappings with mappings from file
$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 $mappingSettings = Import-ContentTypeMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyContentTypeMappingsFileName.sgctm" $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 :
Syntax
Import-ContentTypeMapping -Path <String> [-MappingSettings <MappingSettings>]
Parameters
-MappingSettings <MappingSettings>
Specifies the mapping settings. You can use this command to add multiple mapping settings to an existing mapping settings object. For more details, see Use multiple mapping files at once.
Required? | False |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Path <String>
Specifies the file path that was previously exported with Sharegate.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |