How can I copy a SharePoint Online site and its content to a new URL in the same tenancy using PowerShell?

SteveH 0 Reputation points


Could someone please provide the PowerShell code required to copy a customized SharePoint Online site and its content to a new URL within the same tenancy?

The source site is the top-level site in a site collection with no subsites, and I need to copy all content to the new URL.

I only have site collection admin rights so I can not make a site template.

Thank you.

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
2,185 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
8,098 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Hutchings 6 Reputation points

    Hi Steve,

    There was a similar question previously which a script has been provided as the solution:

    Kind regards,

  2. Yanli Jiang - MSFT 16,741 Reputation points Microsoft Vendor

    Hi @SteveH ,

    The currently used method of copying a site, for SharePoint Online, the official method is "Save site as template" and has limitations: the storage of the file inside the template should no more than 50mb. And you need to have at least SharePoint admin and site collection admin permissions.

    Or use third-party tools. I found an article about copying sites with only site collection admin permissions. You can refer to:

    Note: The third-party product that this article discusses is manufactured by a company that is independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of third-party products referenced in this article.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.