0

I am trying to output to a CSV file the list of activate enterprise features in our sites with DisplayName, GUID and Scope as the content that is written to the CSV file.

I have the following Powershell script but it does not output the DisplayName or the Scope or the GUID - it will only output the url and title of the site that the feature is activated on:

$sites = Get-SPSite -Limit All -ErrorAction SilentlyContinue

foreach ($site in $sites)
{
    $webs = Get-SPWeb -site $site.Url -Limit ALL -ErrorAction SilentlyContinue

foreach ($web in $webs) 
{       

    $premiumfeatures = Get-SPFeature "SharePoint Server Enterprise Site features" -Web $web.Url -ErrorAction SilentlyContinue | select DisplayName, Scope, ID | Sort -Property Scope,DisplayName | FT -GroupBy Scope DisplayName,Id

    foreach ($premiumfeature in $premiumfeatures) 
    {            
        $featureEnabled = "Feature Enabled On: " + $web.Url + " " + $web.Title + " " + $premiumfeature.DisplayName
        Write-Host $featureEnabled
        Add-Content c:\activated_enterprise_features.csv $featureEnabled
    }
    $web.Dispose()
}
$site.Dispose()
}

How can I output the DisplayName, Scope and ID for a feature to CSV?

-1

You can use this command simply

Get-SPFeature -Site "siteurl" | Sort DisplayName | FT DisplayName,scope,Id  > Desktop\feature.csv

FYI:- Powershell command to find active features for site collection

  • does this give me a list of enterprise features? – motionpotion Oct 10 '14 at 11:02
  • Yes, actually enterprise edition will include all SharePoint feature--Foundation + Standard + (features added in enterprise) – ateet Oct 10 '14 at 11:15
  • I am not looking for all features - only Enterprise - hence my script. I am trying to find only the enterprise features that are activated. How do I do that? – motionpotion Oct 10 '14 at 11:17
  • But SharePoint Enterprise edition include all features as I said. Enterprise is top version of SharePoint, hence include all features. So how are differentiating enterprise features and other features as they are part of enterprise itself. – ateet Oct 10 '14 at 11:25
  • Enterprise + Activated is different than "all enterprise features". I want to know which enterprise features are activated in my farm. This is for licensing purposes. – motionpotion Oct 10 '14 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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