Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Today I went to Farm solutions page from CA. There are about 30 of them that are not in use (at least thats what I think).

I could off swearned that I seen a powershell script somewhere. Basically, I need to able to find all the site for a web application and determine which features (solution) are not in use. so I can start cleaning farm solutions.

share|improve this question
    
if you can wait till tomorrow I can make you an application that will do it all for you? at home atm and cba but when i have the chance I will make an app that will get all sites from a given webapp and will display all features that are active/deactive for each site/site collection..depending on what you select... I will try and make it so that you can remove, activate/deactivate from the application :) –  ali Sharepoint Mar 12 '13 at 21:07
    
i will post the app on codeplex for you and then post the url to it here –  ali Sharepoint Mar 12 '13 at 21:33
    
@aliSharepoint: sounds good ali. –  Donna Hayes Mar 13 '13 at 11:37
add comment

3 Answers 3

The Get-SPFeature command will list the features with flags to filter them down to specific areas. Reference: http://technet.microsoft.com/en-us/library/ff607945.aspx

There is also the Get-SPSolution command to show all the solutions on the farm and whether they are deployed and online. Reference: http://technet.microsoft.com/en-us/library/ff607754.aspx Example: Get-SPSolution | Format-Table -Property name, status, deployed, SolutionId

share|improve this answer
add comment

Apart from the Get-SPSolution command to display all solutions on the farm, you could also try a nice application on codeplex which shows features enabled at the farm level, SPSite (Site Collection) and at the SPWeb (Site).

http://featureadmin.codeplex.com

share|improve this answer
add comment

So far I have this and need to work on it more. Let me know if you see any room for improvement. Feel free to use it or test it and let me know.

It's a powershell script

[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SharePoint') 

#DECLARE VARIABLES 
[string]$siteUrl = $args[0] 

function GetMissingParameter 
{ 
  $script:siteUrl = Read-Host "Enter Site URL" 
} 

#IF MISSING PARM FOR SITE URL, ASK FOR INPUT TO FILL 
if($args.length -eq 0) 
{ 
  GetMissingParameter 
} 

$rootSite = New-Object Microsoft.SharePoint.SPSite($siteUrl) 
$spWebApp = $rootSite.WebApplication 

foreach($site in $spWebApp.Sites) 
{
    $CurrentSiteScopedFeatures = Get-SPFeature -Site $site
    Get-SPFeature|where{$_.Scope -eq "Site"}|%{

    $ftExists = $CurrentSiteScopedFeatures[$_.Id]

    #Write-Host "Determining Feature: " $_.DisplayName " is Activated on $($site)"

        if($ftExists -eq $null)
        {
        Write-Host "Feature: " $_.DisplayName " is not Activated on $($site)"

    }
}

    $site.Dispose() 
} 
$rootSite.Dispose()
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.