Passer au contenu principal

Enregistrer le mappage des modèles de site

Remarque : L’intégration PowerShell nécessite un abonnement ShareGate Migrate Pro ou Enterprise. Elle n’est pas disponible avec le forfait Essentials.

Commande

Save-SiteTemplateMapping

Description

La commande permettant d’enregistrer tous les mappages de modèles de site pour un site source et un site de destination spécifiques.

Exemples

Enregistrer des mappages personnalisés pour une liste source et une liste de destination

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

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

# Display the retrieved site template mappings
$mappingSettings

# Example output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings : 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
# SensitivityLabelMappings :

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

# Save the updated site template mappings back to the source and destination sites
$mappingSettings = Save-SiteTemplateMapping -MappingSettings $mappingSettings -SourceSite $srcSite -DestinationSite $dstSite

# Retrieve the updated site template mappings to confirm changes
$mappingSettings = Get-SiteTemplateMapping -SourceSite $srcSite -DestinationSite $dstSite

# Display the updated site template mappings
$mappingSettings

# Example updated 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
# SensitivityLabelMappings :

Syntaxe

Save-SiteTemplateMapping
-MappingSettings <MappingSettings>
-SourceSite <Site>
-DestinationSite <Site>

Paramètres

-DestinationSite <Site>

Spécifie le site de destination.

Obligatoire ?

True

Valeur par défaut

Aucun

Entrée de pipeline acceptée ?

False

Caractères génériques acceptés ?

False

Nom de l’ensemble de paramètres

(All)

Alias

Aucun

-MappingSettings <MappingSettings>

Spécifie les paramètres de mappage.

Obligatoire ?

True

Valeur par défaut

Aucun

Entrée de pipeline acceptée ?

True (ByValue, ByPropertyName)

Caractères génériques acceptés ?

False

Nom de l’ensemble de paramètres

(All)

Alias

Aucun

-SourceSite <Site>

Spécifie le site source.

Obligatoire ?

True

Valeur par défaut

Aucun

Entrée de pipeline acceptée ?

False

Caractères génériques acceptés ?

False

Nom de l’ensemble de paramètres

(All)

Alias

Aucun

Cet article a été traduit à l'aide de l'intelligence artificielle. En cas de doute, référez-vous à la version originale en anglais.

Avez-vous trouvé la réponse à votre question ?