Skip to main content
Set Site Template Mapping
Updated over 3 months ago

Command

Set-SiteTemplateMapping

Description

The command to add or update a site template mapping in the mapping settings.

Examples

Set custom mappings

# Set a default site template mapping for "Team Site" across all languages
$mappingSettings = Set-SiteTemplateMapping -DefaultTemplate -Destination "Team Site" -AllLanguages

# Add a site template mapping for "Blank Site" to "Team Site" for the English (US) language
$mappingSettings = Set-SiteTemplateMapping -MappingSettings $mappingSettings -Source "Blank Site" -Destination "Team Site" -SourceLanguage "en-us" -DestinationLanguage "en-us"

# Display the updated site template mappings
$mappingSettings

# Example output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings : All Languages
# <Default Site Template> -> Team Site
# English (United States)
# Blank Site -> Team Site

Set custom mappings on existing mappings from a source list and a destination list

# Connect to the source and destination sites
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite"
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"

# Retrieve existing site template mappings between the source and destination sites
$mappingSettings = Get-SiteTemplateMapping -SourceSite $srcSite -DestinationSite $dstSite

# Set a default site template mapping for "Team Site" across all languages
$mappingSettings = Set-SiteTemplateMapping -MappingSettings $mappingSettings -DefaultTemplate -Destination "Team Site" -AllLanguages

# Display the updated site template mappings
$mappingSettings

# Example output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings : All Languages
# <Default Site Template> -> Team Site
# English (United States)
# ACCSRV#0 -> <NO DESTINATION>
# ACCSRV#1 -> ACCSRV#1
# ACCSRV#3 -> ACCSRV#3
# ACCSRV#4 -> ACCSRV#4
# ACCSRV#5 -> ACCSRV#5
# ACCSRV#6 -> ACCSRV#6
# BDR#0 -> BDR#0
# BICenterSite#0 -> BICenterSite#0
# BLANKINTERNET#0 -> CMSPUBLISHING#0
# BLANKINTERNET#1 -> <NO DESTINATION>
# BLANKINTERNET#2 -> BLANKINTERNET#2
# BLANKINTERNETCONTAINER#0 -> BLANKINTERNETCONTAINER#0
# BLOG#0 -> BLOG#0
# ...
# STS#0 -> STS#0
# STS#1 -> STS#1
# STS#2 -> STS#2
# TENANTADMIN#0 -> <NO DESTINATION>
# visprus#0 -> visprus#0
# WIKI#0 -> ENTERWIKI#0
# French (France)
# ACCSRV#0 -> <NO DESTINATION>
# ACCSRV#1 -> ACCSRV#1
# ACCSRV#3 -> ACCSRV#3
# ACCSRV#4 -> ACCSRV#4
# ACCSRV#5 -> ACCSRV#5
# ACCSRV#6 -> ACCSRV#6
# BDR#0 -> BDR#0
# BICenterSite#0 -> BICenterSite#0
# BLANKINTERNET#0 -> CMSPUBLISHING#0
# BLANKINTERNET#1 -> <NO DESTINATION>
# BLANKINTERNET#2 -> BLANKINTERNET#2
# BLANKINTERNETCONTAINER#0 -> BLANKINTERNETCONTAINER#0
# BLOG#0 -> BLOG#0
# ...
# STS#0 -> STS#0
# STS#1 -> STS#1
# STS#2 -> STS#2
# TENANTADMIN#0 -> <NO DESTINATION>
# vispr#0 -> vispr#0
# WIKI#0 -> ENTERWIKI#0

Syntax

Set-SiteTemplateMapping-DefaultTemplate <SwitchParameter>
-Ignore <SwitchParameter> 
-AllLanguages <SwitchParameter> 
[-MappingSettings <MappingSettings>]
Set-SiteTemplateMapping-DefaultTemplate <SwitchParameter>
-Destination <String>
-SourceLanguage <String>
-DestinationLanguage <String> 
[-MappingSettings <MappingSettings>]
Set-SiteTemplateMapping-DefaultTemplate <SwitchParameter>
-Ignore <SwitchParameter>
-SourceLanguage <String> 
[-MappingSettings <MappingSettings>]
Set-SiteTemplateMapping-DefaultTemplate <SwitchParameter>
-Destination <String>
-AllLanguages <SwitchParameter> 
[-MappingSettings <MappingSettings>]
Set-SiteTemplateMapping-Source <String>
-Destination<String>
-AllLanguages <SwitchParameter> 
[-MappingSettings <MappingSettings>]
Set-SiteTemplateMapping 
-Source <String> 
-Ignore <SwitchParameter>
-AllLanguages <SwitchParameter> 
[-MappingSettings <MappingSettings>]
Set-SiteTemplateMapping-Source <String> 
-Ignore <SwitchParameter>
-SourceLanguage <String> 
[-MappingSettings <MappingSettings>]
Set-SiteTemplateMapping-Source <String> 
-Destination <String> 
-SourceLanguage <String> 
-DestinationLanguage <String>
[-MappingSettings <MappingSettings>]

Parameters

-AllLanguages <SwitchParameter>

Specifies to use all languages for the source and destination.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

Default, DefaultWithDestination, SourceDestination, Source

Aliases

None

-DefaultTemplate <SwitchParameter>

Specifies to use default site template for the source.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

Default, DefaultWithDestinationAndCulture, DefaultWithCulture, DefaultWithDestination

Aliases

None

-Destination <String>

Specifies the destination site template.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

DefaultWithDestinationAndCulture, DefaultWithDestination, SourceDestination, SourceDestinationWithCulture

Aliases

None

-DestinationLanguage <String>

Specifies the destination site template language.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

DefaultWithDestinationAndCulture, SourceDestinationWithCulture

Aliases

None

-Ignore <SwitchParameter>

Specifies to ignore the site template.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

Default, DefaultWithCulture, Source, SourceWithCulture

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

-Source <String>

Specifies the source site template.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

SourceDestination, Source, SourceWithCulture, SourceDestinationWithCulture

Aliases

None

-SourceLanguage <String>

Specifies the source site template language.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

DefaultWithDestinationAndCulture, DefaultWithCulture, SourceWithCulture, SourceDestinationWithCulture

Aliases

None

Did this answer your question?