Forum Discussion
chiragcanada2020
Nov 23, 2021Copper Contributor
How to copy existing SharePoint Online Prod site with contents same to same for DEV site?
Hello, I have a requirement to mimic exactly as is as the SharePoint online Prod site with contents and permissions and create a new DEV site. How can I achieve that? Please help to get some poin...
- Nov 23, 2021
You can use PnP Powershell to create a site template which you can apply to the DEV site.
https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/introducing-the-pnp-provisioning-engine
Code:
# connect to the prod site Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/prod" # get the template Get-PnPSiteTemplate -Out "PnP-Provisioning-File.xml" # connect to the dev site Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/dev" # apply the template Invoke-PnPSiteTemplate -Path "PnP-Provisioning-File.xml"
Maggan Wåhlin
Nov 23, 2021Iron Contributor
You can use PnP Powershell to create a site template which you can apply to the DEV site.
https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/introducing-the-pnp-provisioning-engine
Code:
# connect to the prod site
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/prod"
# get the template
Get-PnPSiteTemplate -Out "PnP-Provisioning-File.xml"
# connect to the dev site
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/dev"
# apply the template
Invoke-PnPSiteTemplate -Path "PnP-Provisioning-File.xml"- chiragcanada2020Nov 29, 2021Copper ContributorThanks