Get-SPOSiteScriptFromWeb File Not Found error

Misty Miller 1 Reputation point
2022-04-13T17:28:50.697+00:00

I am trying to create a site script from an existing team site using Get-SPOSiteScriptFromWeb cmdlet but when I run the script that I followed from this Microsoft document. I am getting a File Not Found error even though when I run Get-SPOSite, it is listed. I am using the latest SharePoint Online Management Shell. Here is my script:

Get-SPOSiteScriptFromWeb -WebUrl https://mytenant.sharepoint.com/sites/MyPMTeamSite -IncludeBranding -IncludeTheme -IncludeRegionalSettings -IncludeSiteExternalSharingCapability  -IncludeLinksToExportedItems -IncludedLists ("Lists/SiteAssets", "Lists/Shared Documents","Lists/Award Documents Contract Files", "Lists/PWS", "Lists/Deliverables", "Lists/Monthly Reports", "Lists/Invoices", "Lists/Recruiting and Hiring", "Lists/Issues and Correspondence", "Lists/Issue Tracker list", "Lists/Project Tracker list")|clip  

Any assistance would be helpful as I have done everything I can think of to do but cannot figure out what is going on.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,011 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,761 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,590 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 43,176 Reputation points Microsoft Vendor
    2022-04-14T02:39:43.193+00:00

    @Misty Miller

    In my opinion, the error “File not Found” may be related to the parameter "-IncludedLists”. For document library, you should use "Shared%Documents" instead of "Lists/Shared Documents". For list, you should use "Lists/Issue%Tracker%list" instead of "Lists/Issue Tracker list". And make sure that the site collection has a list with that correct name.

    Here's a reference for you.

    SharePoint Online: How to Create a Site Design from Existing Site using PowerShell?

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    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.