This is a script that identifies if SharePoint 2010 foundation, standard or enterprise is installed in your environment. This is part of an SharePoint 2010 summary script I created. I will post some bits of this script on my blog starting with the SharePoint 2010 edition.

This function will show the SharePoint 2010 Edition.
Use this script to identify which version of SharePoint 2010 has been installed (foundation, standard or enterprise)
Function GetEdition
#SharePoint 2010 Snapin
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#check for enterprise feature
if([bool](get-spfeature |?{$_.ID -eq "e4e6a041-bc5b-45cb-beab-885a27079f74"}) -eq $true )
write-host "SharePoint edition: Enterprise" -foregroundcolor green
#check for standard feature
elseif([bool](get-spfeature |?{$_.ID -ne "e4e6a041-bc5b-45cb-beab-885a27079f74" -and $_.ID -eq "69cc9662-d373-47fc-9449-f18d11ff732c"}) -eq $true)
write-host "SharePoint edition: Standard" -foregroundcolor green
write-host "SharePoint edition: Foundation" -foregroundcolor green
Write-Host "Get SharePoint edition unsuccesfull" -foregroundcolor red

When you run this script you get the following message:




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.