Invoke-PnPTenantTemplate
SYNOPSIS
Required Permissions
- SharePoint: Access to the SharePoint Tenant Administration site
Applies a tenant template to the current tenant. You must have the Office 365 Global Admin role to run this cmdlet successfully.
SYNTAX
By Path
Invoke-PnPTenantTemplate [-Path] <String> [-SequenceId <String>] [-ResourceFolder <String>]
[-Handlers <Handlers>] [-ExcludeHandlers <Handlers>] [-ExtensibilityHandlers <ExtensibilityHandler[]>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>] [-Parameters <Hashtable>]
[-OverwriteSystemPropertyBagValues] [-IgnoreDuplicateDataRowErrors] [-ProvisionContentTypesToSubWebs]
[-ProvisionFieldsToSubWebs] [-ClearNavigation] [-Configuration <ApplyConfigurationPipeBind>]
[-Connection <PnPConnection>] [<CommonParameters>]
By Object
Invoke-PnPTenantTemplate [-Template] <ProvisioningHierarchy> [-SequenceId <String>] [-ResourceFolder <String>]
[-Handlers <Handlers>] [-ExcludeHandlers <Handlers>] [-ExtensibilityHandlers <ExtensibilityHandler[]>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>] [-Parameters <Hashtable>]
[-OverwriteSystemPropertyBagValues] [-IgnoreDuplicateDataRowErrors] [-ProvisionContentTypesToSubWebs]
[-ProvisionFieldsToSubWebs] [-ClearNavigation] [-Configuration <ApplyConfigurationPipeBind>]
[-Connection <PnPConnection>] [<CommonParameters>]
DESCRIPTION
Allows to apply a tenant template on current tenant.
EXAMPLES
EXAMPLE 1
Invoke-PnPTenantTemplate -Path myfile.pnp
Will read the tenant template from the filesystem and will apply the sequences in the template
EXAMPLE 2
Invoke-PnPTenantTemplate -Path myfile.pnp -SequenceId "mysequence"
Will read the tenant template from the filesystem and will apply the specified sequence in the template
EXAMPLE 3
Invoke-PnPTenantTemplate -Path myfile.pnp -Parameters @{"ListTitle"="Projects";"parameter2"="a second value"}
Applies a tenant template to the current tenant. It will populate the parameter in the template the values as specified and in the template you can refer to those values with the {parameter:
For instance with the example above, specifying {parameter:ListTitle} in your template will translate to 'Projects' when applying the template. These tokens can be used in most string values in a template. Override the RemoveExistingNodes attribute in the Navigation elements of the template. If you specify this value the navigation nodes will always be removed before adding the nodes in the template Specify a JSON configuration file to configure the extraction progress. Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection. Allows you to run all handlers, excluding the ones specified. Allows you to specify ExtensbilityHandlers to execute while applying a template Allows you to only process a specific part of the template. Notice that this might fail, as some of the handlers require other artifacts in place if they are not part of what your applying. Ignore duplicate data row errors when the data row in the template already exists. Specify this parameter if you want to overwrite and/or create properties that are known to be system entries (starting with vti_, dlc_, etc.) Allows you to specify parameters that can be referred to in the tenant template by means of the {parameter:<Key>} token. See examples on how to use this parameter. Path to the xml or pnp file containing the tenant template. If set content types will be provisioned if the target web is a subweb. If set fields will be provisioned if the target web is a subweb. Root folder where resources/files that are being referenced in the template are located. If not specified the same folder as where the tenant template is located will be used. Allows you to specify ITemplateProviderExtension to execute while applying a template. Shows what would happen if the cmdlet runs. The cmdlet is not run.PARAMETERS
-ClearNavigation
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Configuration
Type: ApplyConfigurationPipeBind
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Connection
Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExcludeHandlers
Type: Handlers
Parameter Sets: (All)
Accepted values: None, AuditSettings, ComposedLook, CustomActions, ExtensibilityProviders, Features, Fields, Files, Lists, Pages, Publishing, RegionalSettings, SearchSettings, SitePolicy, SupportedUILanguages, TermGroups, Workflows, SiteSecurity, ContentTypes, PropertyBagEntries, PageContents, WebSettings, Navigation, ImageRenditions, ApplicationLifecycleManagement, Tenant, WebApiPermissions, SiteHeader, SiteFooter, Theme, SiteSettings, All
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExtensibilityHandlers
Type: ExtensibilityHandler[]
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Handlers
Type: Handlers
Parameter Sets: (All)
Accepted values: None, AuditSettings, ComposedLook, CustomActions, ExtensibilityProviders, Features, Fields, Files, Lists, Pages, Publishing, RegionalSettings, SearchSettings, SitePolicy, SupportedUILanguages, TermGroups, Workflows, SiteSecurity, ContentTypes, PropertyBagEntries, PageContents, WebSettings, Navigation, ImageRenditions, ApplicationLifecycleManagement, Tenant, WebApiPermissions, SiteHeader, SiteFooter, Theme, SiteSettings, All
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IgnoreDuplicateDataRowErrors
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OverwriteSystemPropertyBagValues
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Parameters
Type: Hashtable
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Type: String
Parameter Sets: By Path
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-ProvisionContentTypesToSubWebs
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProvisionFieldsToSubWebs
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ResourceFolder
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SequenceId
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Template
Type: ProvisioningHierarchy
Parameter Sets: By Object
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-TemplateProviderExtensions
Type: ITemplateProviderExtension[]
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
RELATED LINKS