Site Template from a Teams Site

Brass Contributor



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?




14 Replies


You can use PnP.PowerShell module to export site and create new site from exported template.


Command for Exporting Tenant Template: 


Common for Creating new Site from your Template: 


Make sure that you can update Site URL and Title in exported file before using Invoke-PnPTenantTemplate.

Hope it will be helpfull to you.

Thanks, I'll give that a try

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?
Could you please share all the list of command which you are trying
Get-PnPTenantTemplate - Out tenanttemplate.xml -SiteUrl
First You need to run

Connect-PnPOnline command to create connection then only you can run Get-PnPTenantTemplate command

Connect-PnPOnline -Url https://[TenantName] -Interactive
I now get

"A positional parameter cannot be found that accepts arguement"
My mistake, typo in that attempt
Please like my answer it it helped you so that it can be helpful to any other person as well
I'm now getting a 403 Forbidden error
You need to connect with Global Administrator rights
Global Admin rights to SharePoint?


Yes, you need to have admin access to SharePoint to be able to use PnP PowerShell.

Alternatively, you can use a migration tool to make a copy of the site. You can start exploring SharePoint migration tool by Microsoft which is free to use. SPMT Even to use migration tool, you need to have at least site collection admin access for a successful migration.


If you don't want to deal with all of this, you can create your site manually and create individual lists using 'create from existing lists' functionality'. It takes time but you will get there. 

Thanks, I ended up doing the latter.

Thanks everyone for all your help.