Invoke-SSPSiteTemplate.ps1

<#
    .Synopsis
    Instantiates a new site from the given template.
    .Description
    This CmdLet gets a SiteTemplate from a source and instantiates it at the
    destination url.
    .Parameter FileName
    This parameter contains the path of the template file.
    .Parameter Dest
    This parameter contains the Url of the destination site.
    .Parameter DestConnection
    This parameter contains the connection context for the destination site. The default is the current connection
    returned by "Get-PnPConnection".
    .Parameter Handlers
    This parameter contains a list of the handlers to invoke for the template.
 #>

#>

function Invoke-SSPSiteTemplate {
    param(
        [parameter(Mandatory=$true)]
        $fileName,
        [parameter(Mandatory=$true)]
        $destConnection = (Get-PnPConnection),
        [string[]] $handlers
    )

    if ($handlers)
    {
        $ignore = Invoke-PnPSiteTemplate -Path $fileName -Handlers $handlers -Connection $destConnection
    } else {
        $ignore = Invoke-PnPSiteTemplate -Path $fileName -Connection $destConnection
    }
}