sharepoint enterprise – PnP copy .pst in SP site collection to new library in another site collection


We are dealing with SharePoint OnPrem / 2016 in this scenario.

I have a library template located in Site Collection 1, and need to create a library in site collection 2 using this centrally located .pst file in Site Collection 1.

Every example I’ve seen so far has the .pst in the same site collection, but our scenario the .pst will stay in site collection 1 so there’s one source of truth.

Is this an option? Does the .pst have to be in the same site collection where the new library is created if using PnP?

Please advise of any example where I could accomplish this.

Looking at this example currently, but it’s only dealing with a single site:

$ListTemplateInternalName=”TempLibrary_100Rows.stp”
$ListName =”PnpDocumentTEST1″
Connect-PnPOnline -Url https://oursite.com

$Context = Get-PnPContext
$Web = $Context.Site.RootWeb
$ListTemplates = $Context.Site.GetCustomListTemplates($Web)
$Context.Load($Web)
$Context.Load($ListTemplates)
Invoke-PnPQuery

$ListTemplate = $ListTemplates | where { $_.InternalName -eq $ListTemplateInternalName }

if ($ListTemplate -eq $null)
{
Throw (System.Exception) “Template not found”
}

$ListCreation = New-Object Microsoft.SharePoint.Client.ListCreationInformation
$ListCreation.Title = $ListName
$ListCreation.ListTemplate = $ListTemplate

$Web.Lists.Add($ListCreation)
Invoke-PnPQuery

Disconnect-PnPOnline