Sharepoint online library creation from custom template

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of Ryan Yates Ryan Yates 3 months, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #41272
    Profile photo of TheDL
    TheDL
    Participant

    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?

    Any ideas?

    Thanks!

    #41319
    Profile photo of Don Jones
    Don Jones
    Keymaster

    After some extensive Twitter chat with some SharePoint MVPs, it appears you can't. https://twitter.com/ryanyates1990/status/738126959201374209

    #41392
    Profile photo of TheDL
    TheDL
    Participant

    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!

    #41418
    Profile photo of Ryan Yates
    Ryan Yates
    Participant

    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.

    #41428
    Profile photo of Ryan Yates
    Ryan Yates
    Participant

    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 .

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.