Invoke-SSPSiteDesigns.ps1

<#
    .Synopsis
    Applies a SOP Site Design using PnP to the site/tennant.
    .Description
    This CmdLet applies an existing site design to the site/tennant.
    .Parameter Title
    This parameter contains the title of the Site Design. Site designs are referenced by their title.
    .Parameter SiteDesigns
    This parameter contains the a list Site Design Title names. Site designs are referenced by their title.
    .Parameter Url
    This parameter contains the URL of the site. The default is for the current connection.
    .Parameter Connection
    This parameter provides the context for the call. The default is the current connection
    returned by "Get-PnPConnection".
#>


function Invoke-SSPSiteDesigns {
    param(
        [string] $title,
        [string[]] $siteDesigns,
        $connection = (Get-PnPConnection),
        $tenantConnection = $connection,
        [string] $url
    )
    $siteDesigns | % {
        if ($url) {
            $ignore = Invoke-SSPSiteDesign -Title $_ -Url $url -Connection $connection -TenantConnection $tenantConnection
        } else {
            $ignore = Invoke-SSPSiteDesign -Title $_ -Connection $connection -TenantConnection $tenantConnection
        }
    }
}