Team site template failing with New-SPSite

Shane Reeves 1 Reputation point
2022-02-09T19:00:58.717+00:00

Sharepoint 2016 - On prem

New-SPSite -Url "$scUrl" -ContentDatabase $contentDb -OwnerAlias "$primary" -SecondaryOwnerAlias "$secondary" -Template "STS#0" -Name $Name

I am trying to create a site collection using the Team site template "STS#0" however the following error is generated and the site collection doesn't get created.

New-SPSite : Failed to activate feature: Failed to find the XML file at location
'16\Template\Features\FT-01-5fb3bec3-2945-e9a5-7e26-21ea532e509c\feature.xml' 75621519-a6c5-4c1a-a748-5d428e4aa444

I'm guessing this a feature that got removed migrating from 2010 to 2016 a while back. How do I locate the reference and remove it so it can be usable again?

SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,789 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CaseyYang-MSFT 10,316 Reputation points
    2022-02-10T03:05:50.243+00:00

    Hi @Shane Reeves ,

    You can find and remove orphaned feature first:

    //Find the orphaned features  
    Get-SPFeature | ? { $_.Scope -eq $null }  
      
    //Delete the orphaned features  
    $feature = Get-SPFeature | ? { $_.Id -eq “{GUID}” }  
      
    $feature.Delete()  
    

    Then copy feature from 15 to 16. You can find feature folder in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES

    Please remember to back up files in 16 then paste files into it.

    Similar issue For Reference: Error when creating a site off of a site template


    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.