copy .pst in one 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.

This is a pure Sharepoint related question and cannot guarantee an answer from PowerShell forum. O suggest you to post this in Sharepoint forums…

Or are you using PowerShell anywhere in this ?

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

$ListName ="PnpDocumentTEST1"
Connect-PnPOnline -Url

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

$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



Trying the following, but running into template errors:

Connect-PnPOnline -Url https://OurSiteORIG -CurrentCredentials
Get-PnPFile -Url /_catalogs/lt/TempLibrary_100Rows.stp -Path c:\temp -FileName TempLibrary_100Rows.stp -AsFile -Force

#Now the .stp file is downloaded, upload it to destination and create library
Connect-PnPOnline -Url https://OurSiteDest -CurrentCredentials
Add-PnPFile -Path c:\temp\TempLibrary_100Rows.stp -Folder “_catalogs/lt”
New-PnPList -Title “MyNewLibrary” -Template TempLibrary_100Rows -OnQuickLaunch

Please advise of any example where I could accomplish this, as I’m getting the following error:

New-PnPList : Cannot bind parameter ‘Template’. Cannot convert value “TempLibrary_100Rows” to type “Microsoft.SharePoint.Client.ListTemplateType”. Error: “Unable to
match the identifier name TempLibrary_100Rows to a valid enumerator name. Specify one of the following enumerator names and try again:

Check out ListTemplateType for acceptable values for -Template.

So, sounds like we can’t do it…correct?

If I have an existing SharePoint library, I can make a template out of it, and create a new library based off this template all via the browser.

Not understanding why we can’t do same via PnP

Okay, sounds like this may not be an option.

What about a simple copy library from one site collection to another…that’ll work for the moment?

I’ve been searching for scripts, and nothing working so far.

PnP seems like would be super concise option for this.