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.
<# .SYNOPSIS This function will show the SharePoint 2010 Edition. .DESCRIPTION Use this script to identify which version of SharePoint 2010 has been installed (foundation, standard or enterprise) .LINK http://www.maartenpeeters.nl #> Function GetEdition { #SharePoint 2010 Snapin Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue try{ #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 } else { write-host "SharePoint edition: Foundation" -foregroundcolor green } } catch { Write-Host "Get SharePoint edition unsuccesfull" -foregroundcolor red } } GetEdition
When you run this script you get the following message: