SharePoint Site Design - Clone a site and Auto provision using Site Scripts

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 18

  • @m365techhelp
    @m365techhelp  3 роки тому +7

    Below is the sample PowerShell commands:
    $adminSiteUrl = "tenantname-admin.sharepoint.com/"
    $siteUrl = "tenantname.sharepoint.com/sites/sitename"
    $relativeListUrls = "/lists/Project Tracking", "/lists/Issue tracking", "/lists/Announcements"
    Connect-SPOService $adminSiteUrl
    //extract the site script
    $extracted = Get-SPOSiteScriptFromWeb -WebUrl $siteUrl -IncludeTheme -IncludeBranding -IncludeSiteExternalSharingCapability -IncludeRegionalSettings -IncludeLinksToExportedItems -IncludedLists $relativeListUrls
    Add-SPOSiteScript -Title "My Custom template " `
    -Description "This is a copy of a site collection." `
    -Content $extracted
    Add-SPOSiteDesign -Title "Custom Template" -WebTemplate "64" -SiteScripts "" -Description "Applying Team site"

  •  2 роки тому +3

    This video has been of great help to me. It helps me solve an important problem with several clients. It is the best and most complete tutorial I have found. Thanks.

  • @pmd7530
    @pmd7530 9 місяців тому

    This is excellent. Thank you! One question i have is how do we differentiate between a list and a library please?

  • @anelenoroita
    @anelenoroita 3 роки тому +1

    Thank you very much sir, how do we then go about deleting the design once created?

    • @m365techhelp
      @m365techhelp  3 роки тому +1

      You can delete the design using command :
      Remove-SPOSiteDesign ""
      You may get the ID of design using below command:
      Get-SPOSiteDesign | select Id, Title, Description

  • @twangt
    @twangt 3 роки тому

    Very nice video! Thanks!
    It would be interesting to also see how this is done with REST. And btw does REST also extract Layout and Web Part info? Because I noticed that Site Design doesn't :/
    Yet again, thanks for a great guide.
    //A

    • @m365techhelp
      @m365techhelp  3 роки тому

      hi Alexander, Site design does not extract modern pages layouts & webpart as of now but MS is adding more Operation to it so hopefully some day, we will get options to add pages & web parts. REST will also not be able to extract layout & webpart as its just another way to work in Site Scripts & Design instead of PowerShell. PnP Provisioning Schema will give you more options to do so. You can have a look on sample schema at : docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/introducing-the-pnp-provisioning-engine

  • @ShagunTalkies
    @ShagunTalkies 3 роки тому +1

    Can this design will have it's own template I'd for further automation?

    • @m365techhelp
      @m365techhelp  3 роки тому +1

      Yes , it does. When you add the design , it returns ID which can be used further for updating the same design or removing it in future.

  • @anelenoroita
    @anelenoroita 3 роки тому +1

    Thanks again, but I see this method excludes other custom webparts and existing text content. Is there a way to extract that info as well?

    • @m365techhelp
      @m365techhelp  3 роки тому +2

      There is another video in my channel explaining custom solution inside SPO designs
      ua-cam.com/video/nf3bqtNvSGs/v-deo.html

  • @HammadJagirdar
    @HammadJagirdar 5 місяців тому

    it does not move the library content pics , used to customize the site. how to include the folder content in PowerShell

    • @HammadJagirdar
      @HammadJagirdar 3 місяці тому

      @m365techhelp How to include the site assets library containing the photos used in webparts

  • @sunny48285
    @sunny48285 3 роки тому

    But this template is available in all site collections do we have any option to create template at site collection level instead on tenant level

  • @jalbers1955
    @jalbers1955 3 роки тому

    Thanks! I would like to use this but I don't see the script in the comments

    • @m365techhelp
      @m365techhelp  3 роки тому +3

      Below is the sample PowerShell commands:
      $adminSiteUrl = "tenantname-admin.sharepoint.com/"
      $siteUrl = "tenantname.sharepoint.com/sites/sitename"
      $relativeListUrls = "/lists/Project Tracking", "/lists/Issue tracking", "/lists/Announcements"
      Connect-SPOService $adminSiteUrl
      //extract the site script
      $extracted = Get-SPOSiteScriptFromWeb -WebUrl $siteUrl -IncludeTheme -IncludeBranding -IncludeSiteExternalSharingCapability -IncludeRegionalSettings -IncludeLinksToExportedItems -IncludedLists $relativeListUrls
      Add-SPOSiteScript -Title "My Custom template " `
      -Description "This is a copy of a site collection." `
      -Content $extracted
      Add-SPOSiteDesign -Title "Custom Template" -WebTemplate "64" -SiteScripts "" -Description "Applying Team site"

  • @sanwalPardeep
    @sanwalPardeep 3 роки тому

    Hi, need some help with approval workflow.