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.
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:tempTempLibrary_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: