This topic contains 4 replies, has 3 voices, and was last updated by
June 1, 2016 at 7:59 pm #41272ParticipantPoints: 0Rank: Member
First time poster, been finding answers on here for a bit though. Great community!
I am trying to create a new sharepoint online library from a saved custom template. I am able to do this through the O365 portal, and I am able to create a new sharepoint online library with powershell as per this article:
However, I can't figure out how to call a custom template. I've found few articles referencing PS scripts against sharepoint 2010, but they don't seem to work.
Has anyone tried this? Seems like I'm very close, but can't get it to work.
Also – I would love to be able to feed the powershell command with new site library names from a file to bulk create many libraries from the same template with different names if someone knows how to do that?
June 1, 2016 at 10:16 pm #41319KeymasterPoints: 1,785Rank: Community Hero
After some extensive Twitter chat with some SharePoint MVPs, it appears you can't. https://twitter.com/ryanyates1990/status/738126959201374209
June 2, 2016 at 2:38 pm #41392ParticipantPoints: 0Rank: Member
Thanks for the quick reply Don! I appreciate your efforts and those in twitter thread that tried as well
That was the answer I got elsewhere also, but the powershell.org community has been known to find creative ways to get things done. Thanks al!
June 2, 2016 at 3:36 pm #41418ParticipantPoints: 77Rank: Member
To add some further background to this when I used to do a lot more SharePoint work I moved away from building Lists in the GUI and started to build them all using CSOM and PowerShell with the SPPS module http://sharepointpowershell.codeplex.com/ as this allowed me to build, test and delete them in an automated fashion and I ensured that I had the functions available to do this.
I did start work on a function to export a list from 1 site and then import it into another site however I then got side tracked when I ended up leaving doing much SharePoint work.
I would advise to head to the PnP PowerShell Repository and see if the guys there can expand the Get-SPOProvisioningTemplate to output only List Schemas as I was unable to get the list schema using PowerShell and CSOM though that may be due to my rustiness with CSOM more than anything else.
June 2, 2016 at 4:08 pm #41428ParticipantPoints: 77Rank: Member
However that being said you can get some of the functionality copied between lists even in different site collections or environments (think On-Prem to SPO) using the below sample using the SPPS module as detailed in my last post.
Hopefully that will help you get on your way .
The topic ‘Sharepoint online library creation from custom template’ is closed to new replies.