locked
Test-spcontentdatabase showing missing features and webparts after removing with faulty feature migration 2013 RRS feed

  • Question

  • We have one big site collection with Bamboo,Fab40 and few other Solutions in 2010 and we want to migrate it to 2013 with no bamboo and fab40in it.

    Test-spcontentdatabase is showing around 200+ missing features so we took backup of 2010 db and restored it in 2010 farm which does not have bamboo and fab40 so we got all site and web features and error so we went ahead and deleted those and ran again test-spcontentdatabase so now site features are removed and no complain but web features which are removed by going into each site still saying it is missing.

    We deleted those web features with Feature admin Codeplex tool and powershell remove-spfeature $web and we can see these features are removed in feature admin and also in powershell script get-spfeature but when you run get-spfeature it says this feature is web and its available in web app

    Need help how to remove these web features and no complain in test-spcontentdatabase

    Thursday, May 19, 2016 6:45 PM

All replies

  • Hi aminmihirh,

    This issue usually happened when the feature was still be actived in a specific site collection before it was removed.

    As a solution, I would suggest you can directly use Remove-SPFeatureFromContentDB command to delete the feature from Content DataBase based on the feature ID, then the feature will be removed completely and the warning will also gone.

    More information about the PowerShell script to delete feature from Content DataBase:

    Removing features from a content database in SharePoint 2010 using PowerShell

    Thanks

    Best Regards


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Friday, May 20, 2016 11:08 AM
  • Hi,

    Remove-spfeaturecontentDb is not Cmdlet its function someone created as below

    function Remove-SPFeatureFromContentDB($ContentDb,
    $FeatureId, [switch]$ReportOnly)
    {
        $db = Get-SPDatabase | where {
    $_.Name -eq $ContentDb }
        [bool]$report = $false
        if ($ReportOnly) {
    $report = $true }
       
        $db.Sites | ForEach-Object {
           

            Remove-SPFeature -obj $_ -objName "site collection" -featId
    $FeatureId -report $report
                   
            $_ | Get-SPWeb -Limit
    all | ForEach-Object {
               
                Remove-SPFeature -obj $_
    -objName "site" -featId $FeatureId -report $report
            }
       
    }
    }

    function Remove-SPFeature($obj, $objName, $featId,
    [bool]$report)
    {
        $feature = $obj.Features[$featId]
       
        if
    ($feature -ne $null) {
            if ($report) {
                write-host
    "Feature found in" $objName ":" $obj.Url -foregroundcolor Red
           
    }
            else
            {
                try {
                   
    $obj.Features.Remove($feature.DefinitionId, $true)
                    write-host
    "Feature successfully removed from" $objName ":" $obj.Url -foregroundcolor
    Red
                }
                catch {
                    write-host "There
    has been an error trying to remove the feature:" $_
                }
           
    }
        }
        else {
            #write-host "Feature ID specified does not
    exist in" $objName ":" $obj.Url
        }
    }

    I used same powershell script to removefeature but its stillnot going away

    Friday, May 20, 2016 12:47 PM