Table of Contents

Convert-PnPSiteTemplate

SYNOPSIS

Converts a provisioning template to an other schema version

SYNTAX

Convert-PnPSiteTemplate [-Path] <String> [-Out <String>] [[-ToSchema] <XMLPnPSchemaVersion>]
 [-Encoding <Encoding>] [-Force] 

DESCRIPTION

Allows to convert a provisioning template to an other schema version.

EXAMPLES

EXAMPLE 1

Convert-PnPSiteTemplate -Path template.xml

Converts a provisioning template to the latest schema and outputs the result to current console.

EXAMPLE 2

Convert-PnPSiteTemplate -Path template.xml -Out newtemplate.xml

Converts a provisioning template to the latest schema and outputs the result the newtemplate.xml file.

EXAMPLE 3

Convert-PnPSiteTemplate -Path template.xml -Out newtemplate.xml -ToSchema V201512

Converts a provisioning template to the latest schema using the 201512 schema and outputs the result the newtemplate.xml file.

PARAMETERS

-Encoding

The encoding type of the XML file, Unicode is default

Type: Encoding
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

Overwrites the output file if it exists

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Out

Filename to write to, optionally including full path

Type: String
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

Path to the xml file containing the site template

Type: String
Parameter Sets: (All)

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ToSchema

The schema of the output to use, defaults to the latest schema

Type: XMLPnPSchemaVersion
Parameter Sets: (All)
Accepted values: LATEST, V201503, V201505, V201508, V201512, V201605, V201705, V201801, V201805, V201807, V201903, V201909, V202002, V202103, V202209

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices Encoding documentation