Forum Discussion
Lee-Martin
Jul 28, 2022Brass Contributor
Site Template from a Teams Site
Hi
I've got a Site which I need to duplicate, after a bit of research it looks like a Teams Site (based off office groups).
Is there any way I can get a site template from this?
Thanks
- kalpeshvaghelaSteel Contributor
Lee-Martin
You can use PnP.PowerShell module to export site and create new site from exported template.Command for Exporting Tenant Template: https://pnp.github.io/powershell/cmdlets/Get-PnPTenantTemplate.html
Common for Creating new Site from your Template: https://pnp.github.io/powershell/cmdlets/Invoke-PnPTenantTemplate.html
Make sure that you can update Site URL and Title in exported file before using Invoke-PnPTenantTemplate.
Hope it will be helpfull to you.- Lee-MartinBrass ContributorThanks, I'll give that a try
- Lee-MartinBrass Contributor@kalpeshavaghela
I'm getting an error
"The Current connection holds no SharePoint context. Please use ne of the Connect -PnPOnline commands which uses the -url argument to connect"
Have you seen this before?