Read-PnPTenantTemplate
SYNOPSIS
Loads/Reads a PnP tenant template from the file system and returns an in-memory instance of this template.
SYNTAX
By Path (default)
Read-PnPTenantTemplate -Path <String> [-Experimental]
By Stream
Read-PnPTenantTemplate -Stream <Stream> [-Experimental]
By XML
Read-PnPTenantTemplate -Xml <String> [-Experimental]
DESCRIPTION
Allows to load a PnP tenant template from the file system, from a stream or from a string to memory and return its instance object.
EXAMPLES
EXAMPLE 1
Read-PnPTenantTemplate -Path template.pnp
Reads a PnP tenant template file from the file system and returns an in-memory instance
EXAMPLE 2
$template = Get-PnPFile "/sites/config/Templates/Default.xml" -AsMemoryStream
Read-PnPTenantTemplate -Stream $template
Downloads a PnP Tenant template from the provided location into memory and parses its contents into a TenantTemplate instance which can then be modified and passed on to the Apply-PnPTenantTemplate cmdlet without needing to write anything to disk
PARAMETERS
-Experimental
Runs this cmdlet on the experimental PnP.Core.Provisioning engine instead of PnP Framework. It needs more permissions than PnP Framework, and a .pnp package can only be opened by the engine that created it. See The experimental PnP.Core.Provisioning engine.
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Filename to read from, optionally including full path.
Type: String
Parameter Sets: By Path
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Stream
A stream containing the PnP tenant template.
Type: String
Parameter Sets: By Stream
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Xml
A string containing the XML of the PnP tenant template.
Type: String
Parameter Sets: By XML
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False